diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 119c2422aac7..75884aecf920 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -2179,8 +2179,10 @@ xfs_bmap_add_extent_delay_real( | |||
2179 | } | 2179 | } |
2180 | temp = xfs_bmap_worst_indlen(bma->ip, temp); | 2180 | temp = xfs_bmap_worst_indlen(bma->ip, temp); |
2181 | temp2 = xfs_bmap_worst_indlen(bma->ip, temp2); | 2181 | temp2 = xfs_bmap_worst_indlen(bma->ip, temp2); |
2182 | diff = (int)(temp + temp2 - startblockval(PREV.br_startblock) - | 2182 | diff = (int)(temp + temp2 - |
2183 | (bma->cur ? bma->cur->bc_private.b.allocated : 0)); | 2183 | (startblockval(PREV.br_startblock) - |
2184 | (bma->cur ? | ||
2185 | bma->cur->bc_private.b.allocated : 0))); | ||
2184 | if (diff > 0) { | 2186 | if (diff > 0) { |
2185 | error = xfs_mod_fdblocks(bma->ip->i_mount, | 2187 | error = xfs_mod_fdblocks(bma->ip->i_mount, |
2186 | -((int64_t)diff), false); | 2188 | -((int64_t)diff), false); |
@@ -2232,7 +2234,6 @@ xfs_bmap_add_extent_delay_real( | |||
2232 | temp = da_new; | 2234 | temp = da_new; |
2233 | if (bma->cur) | 2235 | if (bma->cur) |
2234 | temp += bma->cur->bc_private.b.allocated; | 2236 | temp += bma->cur->bc_private.b.allocated; |
2235 | ASSERT(temp <= da_old); | ||
2236 | if (temp < da_old) | 2237 | if (temp < da_old) |
2237 | xfs_mod_fdblocks(bma->ip->i_mount, | 2238 | xfs_mod_fdblocks(bma->ip->i_mount, |
2238 | (int64_t)(da_old - temp), false); | 2239 | (int64_t)(da_old - temp), false); |