aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.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_rtalloc.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_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index f29424964521..87323f1ded64 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -112,7 +112,7 @@ xfs_growfs_rt_alloc(
112 * Lock the inode. 112 * Lock the inode.
113 */ 113 */
114 xfs_ilock(ip, XFS_ILOCK_EXCL); 114 xfs_ilock(ip, XFS_ILOCK_EXCL);
115 xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL); 115 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
116 116
117 xfs_bmap_init(&flist, &firstblock); 117 xfs_bmap_init(&flist, &firstblock);
118 /* 118 /*
@@ -155,7 +155,7 @@ xfs_growfs_rt_alloc(
155 * Lock the bitmap inode. 155 * Lock the bitmap inode.
156 */ 156 */
157 xfs_ilock(ip, XFS_ILOCK_EXCL); 157 xfs_ilock(ip, XFS_ILOCK_EXCL);
158 xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL); 158 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
159 /* 159 /*
160 * Get a buffer for the block. 160 * Get a buffer for the block.
161 */ 161 */
@@ -1960,7 +1960,7 @@ xfs_growfs_rt(
1960 * Lock out other callers by grabbing the bitmap inode lock. 1960 * Lock out other callers by grabbing the bitmap inode lock.
1961 */ 1961 */
1962 xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); 1962 xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
1963 xfs_trans_ijoin_ref(tp, mp->m_rbmip, XFS_ILOCK_EXCL); 1963 xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
1964 /* 1964 /*
1965 * Update the bitmap inode's size. 1965 * Update the bitmap inode's size.
1966 */ 1966 */
@@ -1972,7 +1972,7 @@ xfs_growfs_rt(
1972 * Get the summary inode into the transaction. 1972 * Get the summary inode into the transaction.
1973 */ 1973 */
1974 xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL); 1974 xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
1975 xfs_trans_ijoin_ref(tp, mp->m_rsumip, XFS_ILOCK_EXCL); 1975 xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
1976 /* 1976 /*
1977 * Update the summary inode's size. 1977 * Update the summary inode's size.
1978 */ 1978 */
@@ -2143,7 +2143,7 @@ xfs_rtfree_extent(
2143 * Synchronize by locking the bitmap inode. 2143 * Synchronize by locking the bitmap inode.
2144 */ 2144 */
2145 xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); 2145 xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
2146 xfs_trans_ijoin_ref(tp, mp->m_rbmip, XFS_ILOCK_EXCL); 2146 xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
2147 2147
2148#if defined(__KERNEL__) && defined(DEBUG) 2148#if defined(__KERNEL__) && defined(DEBUG)
2149 /* 2149 /*