mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
4d16e9246f
commit
898621d5a7
19 changed files with 103 additions and 247 deletions
|
@ -1892,7 +1892,6 @@ xfs_trans_roll(
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
xfs_trans_ijoin(trans, dp, XFS_ILOCK_EXCL);
|
||||
xfs_trans_ihold(trans, dp);
|
||||
xfs_trans_ijoin(trans, dp);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue