journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); 
error = journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2); 
int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) {    struct inode *inode = dentry->d_inode ;    int error ;    unsigned int ia_valid = attr->ia_valid;    reiserfs_write_lock(inode->i_sb);    if (attr->ia_valid & ATTR_SIZE) {	/* version 2 items will be caught by the s_maxbytes check	** done for us in vmtruncate	*/	if (get_inode_item_key_version(inode) == KEY_FORMAT_3_5 &&	    attr->ia_size > MAX_NON_LFS) {	    error = -EFBIG ;	    goto out;	}	/* fill in hole pointers in the expanding truncate case. */        if (attr->ia_size > inode->i_size) {	    error = generic_cont_expand(inode, attr->ia_size) ;	    if (REISERFS_I(inode)->i_prealloc_count > 0) {		int err;		struct reiserfs_transaction_handle th ;		/* we're changing at most 2 bitmaps, inode + super */		err = journal_begin(&th, inode->i_sb, 4) ;		if (!err) {		    reiserfs_discard_prealloc (&th, inode);		    err = journal_end(&th, inode->i_sb, 4) ;		}		if (err)		    error = err;	    }	    if (error)	        goto out;	}    }    if ((((attr->ia_valid & ATTR_UID) && (attr->ia_uid & ~0xffff)) ||	 ((attr->ia_valid & ATTR_GID) && (attr->ia_gid & ~0xffff))) &&	(get_inode_sd_version (inode) == STAT_DATA_V1)) {		/* stat data of format v3.5 has 16 bit uid and gid */	    error = -EINVAL;	    goto out;	}    error = inode_change_ok(inode, attr) ;    if (!error) {	if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||	    (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) {                error = reiserfs_chown_xattrs (inode, attr);                if (!error) {		    struct reiserfs_transaction_handle th;		    /* (user+group)*(old+new) structure - we count quota info and , inode write (sb, inode) */		    journal_begin(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);                    error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;		    if (error) {			journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);			goto out;		    }		    /* Update corresponding info in inode so that everything is in		     * one transaction */		    if (attr->ia_valid & ATTR_UID)			inode->i_uid = attr->ia_uid;		    if (attr->ia_valid & ATTR_GID)			inode->i_gid = attr->ia_gid;		    mark_inode_dirty(inode);		    journal_end(&th, inode->i_sb, 4*REISERFS_QUOTA_INIT_BLOCKS+2);		}        }        if (!error)            error = inode_setattr(inode, attr) ;    }    if (!error && reiserfs_posixacl (inode->i_sb)) {        if (attr->ia_valid & ATTR_MODE)            error = reiserfs_acl_chmod (inode);    }out:    reiserfs_write_unlock(inode->i_sb);    return error ;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/bd6a1f16fffdfe010fdc2979fd01f12357816762/inode.c/buggy/fs/reiserfs/inode.c