aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rename.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_rename.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_rename.c')
-rw-r--r--fs/xfs/xfs_rename.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index df78c297d1a1..866de277079a 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -170,12 +170,12 @@ xfs_rename(
170 * we can rely on either trans_commit or trans_cancel to unlock 170 * we can rely on either trans_commit or trans_cancel to unlock
171 * them. 171 * them.
172 */ 172 */
173 xfs_trans_ijoin_ref(tp, src_dp, XFS_ILOCK_EXCL); 173 xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL);
174 if (new_parent) 174 if (new_parent)
175 xfs_trans_ijoin_ref(tp, target_dp, XFS_ILOCK_EXCL); 175 xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL);
176 xfs_trans_ijoin_ref(tp, src_ip, XFS_ILOCK_EXCL); 176 xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL);
177 if (target_ip) 177 if (target_ip)
178 xfs_trans_ijoin_ref(tp, target_ip, XFS_ILOCK_EXCL); 178 xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL);
179 179
180 /* 180 /*
181 * If we are using project inheritance, we only allow renames 181 * If we are using project inheritance, we only allow renames