summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorChristoph Hellwig2013-10-14 16:09:35 +0200
committerBen Myers2013-10-21 23:51:33 +0200
commit76ca4c238cf5858f8ba5bcd24c94c23717f1e14e (patch)
tree8059d74fc74e68a6f8765ce5f65247ba319117bd /fs/xfs/xfs_bmap_util.c
parentxfs: don't break from growfs ag update loop on error (diff)
downloadkernel-qcow2-linux-76ca4c238cf5858f8ba5bcd24c94c23717f1e14e.tar.gz
kernel-qcow2-linux-76ca4c238cf5858f8ba5bcd24c94c23717f1e14e.tar.xz
kernel-qcow2-linux-76ca4c238cf5858f8ba5bcd24c94c23717f1e14e.zip
xfs: always take the iolock around xfs_setattr_size
There is no reason to conditionally take the iolock inside xfs_setattr_size when we can let the caller handle it unconditionally, which just incrases the lock hold time for the case where it was previously taken internally by a few instructions. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 97f952caea74..291e30cedfd3 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1622,8 +1622,7 @@ xfs_change_file_space(
iattr.ia_valid = ATTR_SIZE;
iattr.ia_size = startoffset;
- error = xfs_setattr_size(ip, &iattr,
- attr_flags | XFS_ATTR_NOLOCK);
+ error = xfs_setattr_size(ip, &iattr);
xfs_iunlock(ip, XFS_IOLOCK_EXCL);
if (error)