diff options
-rw-r--r-- | fs/xfs/xfs_bmap.c | 9 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 9 |
2 files changed, 13 insertions, 5 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 3548c6f7559..85e7e327bcd 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -5124,6 +5124,15 @@ xfs_bunmapi( | |||
5124 | cur->bc_private.b.flags = 0; | 5124 | cur->bc_private.b.flags = 0; |
5125 | } else | 5125 | } else |
5126 | cur = NULL; | 5126 | cur = NULL; |
5127 | |||
5128 | if (isrt) { | ||
5129 | /* | ||
5130 | * Synchronize by locking the bitmap inode. | ||
5131 | */ | ||
5132 | xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); | ||
5133 | xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); | ||
5134 | } | ||
5135 | |||
5127 | extno = 0; | 5136 | extno = 0; |
5128 | while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && | 5137 | while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && |
5129 | (nexts == 0 || extno < nexts)) { | 5138 | (nexts == 0 || extno < nexts)) { |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 87323f1ded6..ca4f31534a0 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -183,6 +183,7 @@ error_cancel: | |||
183 | oblocks = map.br_startoff + map.br_blockcount; | 183 | oblocks = map.br_startoff + map.br_blockcount; |
184 | } | 184 | } |
185 | return 0; | 185 | return 0; |
186 | |||
186 | error: | 187 | error: |
187 | return error; | 188 | return error; |
188 | } | 189 | } |
@@ -2139,11 +2140,9 @@ xfs_rtfree_extent( | |||
2139 | xfs_buf_t *sumbp; /* summary file block buffer */ | 2140 | xfs_buf_t *sumbp; /* summary file block buffer */ |
2140 | 2141 | ||
2141 | mp = tp->t_mountp; | 2142 | mp = tp->t_mountp; |
2142 | /* | 2143 | |
2143 | * Synchronize by locking the bitmap inode. | 2144 | ASSERT(mp->m_rbmip->i_itemp != NULL); |
2144 | */ | 2145 | ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); |
2145 | xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); | ||
2146 | xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); | ||
2147 | 2146 | ||
2148 | #if defined(__KERNEL__) && defined(DEBUG) | 2147 | #if defined(__KERNEL__) && defined(DEBUG) |
2149 | /* | 2148 | /* |