aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-18 16:47:51 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:08 -0400
commit23bb0be1a237c8732ce1a43140e5cb103a676b92 (patch)
treedeb4405e0612bf50472040587bbbef398a49888c /fs/xfs/xfs_vnodeops.c
parent8292d88c5c833fc8b837c3a018fd6d72c35a3231 (diff)
xfs: unlock the inode before log force in xfs_change_file_space
Let the transaction commit unlock the inode before it potentially causes a synchronous log force. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index f47ecee8d437..c9c8e8230b21 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -2349,8 +2349,7 @@ xfs_change_file_space(
2349 } 2349 }
2350 2350
2351 xfs_ilock(ip, XFS_ILOCK_EXCL); 2351 xfs_ilock(ip, XFS_ILOCK_EXCL);
2352 2352 xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
2353 xfs_trans_ijoin(tp, ip);
2354 2353
2355 if ((attr_flags & XFS_ATTR_DMI) == 0) { 2354 if ((attr_flags & XFS_ATTR_DMI) == 0) {
2356 ip->i_d.di_mode &= ~S_ISUID; 2355 ip->i_d.di_mode &= ~S_ISUID;
@@ -2375,10 +2374,5 @@ xfs_change_file_space(
2375 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 2374 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
2376 if (attr_flags & XFS_ATTR_SYNC) 2375 if (attr_flags & XFS_ATTR_SYNC)
2377 xfs_trans_set_sync(tp); 2376 xfs_trans_set_sync(tp);
2378 2377 return xfs_trans_commit(tp, 0);
2379 error = xfs_trans_commit(tp, 0);
2380
2381 xfs_iunlock(ip, XFS_ILOCK_EXCL);
2382
2383 return error;
2384} 2378}