aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-19 11:00:54 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:08 -0400
commitddc3415aba1cb2f86d1fcad720cea834ee178f54 (patch)
tree7a31a932ce0b7080557be062ccc7c3c0e181b140 /fs/xfs/xfs_inode.c
parent23bb0be1a237c8732ce1a43140e5cb103a676b92 (diff)
xfs: simplify xfs_trans_ijoin* again
There is no reason to keep a reference to the inode even if we unlock it during transaction commit because we never drop a reference between the ijoin and commit. Also use this fact to merge xfs_trans_ijoin_ref back into xfs_trans_ijoin - the third argument decides if an unlock is needed now. I'm actually starting to wonder if allowing inodes to be unlocked at transaction commit really is worth the effort. The only real benefit is that they can be unlocked earlier when commiting a synchronous transactions, but that could be solved by doing the log force manually after the unlock, too. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index f690d3a10b34..b676494a55ca 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1152,7 +1152,7 @@ xfs_ialloc(
1152 /* 1152 /*
1153 * Log the new values stuffed into the inode. 1153 * Log the new values stuffed into the inode.
1154 */ 1154 */
1155 xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL); 1155 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
1156 xfs_trans_log_inode(tp, ip, flags); 1156 xfs_trans_log_inode(tp, ip, flags);
1157 1157
1158 /* now that we have an i_mode we can setup inode ops and unlock */ 1158 /* now that we have an i_mode we can setup inode ops and unlock */
@@ -1297,7 +1297,7 @@ xfs_itruncate_extents(
1297 */ 1297 */
1298 error = xfs_bmap_finish(&tp, &free_list, &committed); 1298 error = xfs_bmap_finish(&tp, &free_list, &committed);
1299 if (committed) 1299 if (committed)
1300 xfs_trans_ijoin(tp, ip); 1300 xfs_trans_ijoin(tp, ip, 0);
1301 if (error) 1301 if (error)
1302 goto out_bmap_cancel; 1302 goto out_bmap_cancel;
1303 1303
@@ -1313,7 +1313,7 @@ xfs_itruncate_extents(
1313 error = xfs_trans_commit(tp, 0); 1313 error = xfs_trans_commit(tp, 0);
1314 tp = ntp; 1314 tp = ntp;
1315 1315
1316 xfs_trans_ijoin(tp, ip); 1316 xfs_trans_ijoin(tp, ip, 0);
1317 1317
1318 if (error) 1318 if (error)
1319 goto out; 1319 goto out;