aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.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_iomap.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_iomap.c')
-rw-r--r--fs/xfs/xfs_iomap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index da5bf05c5bb7..9afa282aa937 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -208,7 +208,7 @@ xfs_iomap_write_direct(
208 if (error) 208 if (error)
209 goto error1; 209 goto error1;
210 210
211 xfs_trans_ijoin(tp, ip); 211 xfs_trans_ijoin(tp, ip, 0);
212 212
213 bmapi_flag = 0; 213 bmapi_flag = 0;
214 if (offset < ip->i_size || extsz) 214 if (offset < ip->i_size || extsz)
@@ -528,7 +528,7 @@ xfs_iomap_write_allocate(
528 return XFS_ERROR(error); 528 return XFS_ERROR(error);
529 } 529 }
530 xfs_ilock(ip, XFS_ILOCK_EXCL); 530 xfs_ilock(ip, XFS_ILOCK_EXCL);
531 xfs_trans_ijoin(tp, ip); 531 xfs_trans_ijoin(tp, ip, 0);
532 532
533 xfs_bmap_init(&free_list, &first_block); 533 xfs_bmap_init(&free_list, &first_block);
534 534
@@ -692,7 +692,7 @@ xfs_iomap_write_unwritten(
692 } 692 }
693 693
694 xfs_ilock(ip, XFS_ILOCK_EXCL); 694 xfs_ilock(ip, XFS_ILOCK_EXCL);
695 xfs_trans_ijoin(tp, ip); 695 xfs_trans_ijoin(tp, ip, 0);
696 696
697 /* 697 /*
698 * Modify the unwritten extent state of the buffer. 698 * Modify the unwritten extent state of the buffer.