Skip to content

Commit

Permalink
xfs: split xfs_setattr
Browse files Browse the repository at this point in the history
Split up xfs_setattr into two functions, one for the complex truncate
handling, and one for the trivial attribute updates.  Also move both
new routines to xfs_iops.c as they are fairly Linux-specific.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
  • Loading branch information
Christoph Hellwig committed Jul 8, 2011
1 parent dec58f1 commit c4ed424
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 429 deletions.
2 changes: 1 addition & 1 deletion fs/xfs/linux-2.6/xfs_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ xfs_set_mode(struct inode *inode, mode_t mode)
iattr.ia_mode = mode;
iattr.ia_ctime = current_fs_time(inode->i_sb);

error = -xfs_setattr(XFS_I(inode), &iattr, XFS_ATTR_NOACL);
error = -xfs_setattr_nonsize(XFS_I(inode), &iattr, XFS_ATTR_NOACL);
}

return error;
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/linux-2.6/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ xfs_file_fallocate(

iattr.ia_valid = ATTR_SIZE;
iattr.ia_size = new_size;
error = -xfs_setattr(ip, &iattr, XFS_ATTR_NOLOCK);
error = -xfs_setattr_size(ip, &iattr, XFS_ATTR_NOLOCK);
}

out_unlock:
Expand Down
Loading

0 comments on commit c4ed424

Please sign in to comment.