aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-06-23 21:36:58 -0400
committerAlex Elder <aelder@sgi.com>2010-07-26 14:16:36 -0400
commit898621d5a72c6799a9a13fce20443b4b6699899c (patch)
tree6cd994bd8d24f4f4f6ac5b5b57e0b99ee02d4ba6 /fs/xfs/xfs_trans.c
parent4d16e9246fc3b3cf7bc95609eff66929a39daa06 (diff)
xfs: simplify inode to transaction joining
Currently we need to either call IHOLD or xfs_trans_ihold on an inode when joining it to a transaction via xfs_trans_ijoin. This patches instead makes xfs_trans_ijoin usable on it's own by doing an implicity xfs_trans_ihold, which also allows us to drop the third argument. For the case where we want to hold a reference on the inode a xfs_trans_ijoin_ref wrapper is added which does the IHOLD and marks the inode for needing an xfs_iput. In addition to the cleaner interface to the caller this also simplifies the implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r--fs/xfs/xfs_trans.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 213792e1ad02..f2065ccb6c2d 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1892,7 +1892,6 @@ xfs_trans_roll(
1892 if (error) 1892 if (error)
1893 return error; 1893 return error;
1894 1894
1895 xfs_trans_ijoin(trans, dp, XFS_ILOCK_EXCL); 1895 xfs_trans_ijoin(trans, dp);
1896 xfs_trans_ihold(trans, dp);
1897 return 0; 1896 return 0;
1898} 1897}