diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-06-24 11:36:58 +1000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 13:16:36 -0500 |
commit | 898621d5a72c6799a9a13fce20443b4b6699899c (patch) | |
tree | 6cd994bd8d24f4f4f6ac5b5b57e0b99ee02d4ba6 /fs/xfs/linux-2.6/xfs_file.c | |
parent | 4d16e9246fc3b3cf7bc95609eff66929a39daa06 (diff) | |
download | talos-obmc-linux-898621d5a72c6799a9a13fce20443b4b6699899c.tar.gz talos-obmc-linux-898621d5a72c6799a9a13fce20443b4b6699899c.zip |
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/linux-2.6/xfs_file.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 8d26d93648b4..9a9b446a58a7 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -158,8 +158,7 @@ xfs_file_fsync( * transaction. So we play it safe and fire off the * transaction anyway. */ - xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); - xfs_trans_ihold(tp, ip); + xfs_trans_ijoin(tp, ip); xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); xfs_trans_set_sync(tp); error = _xfs_trans_commit(tp, 0, &log_flushed); |