aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index f02eb7673392..a7048eafa8e6 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1280,7 +1280,6 @@ xfs_bmap_read_extents(
1280 xfs_bmbt_rec_t *frp; 1280 xfs_bmbt_rec_t *frp;
1281 xfs_fsblock_t nextbno; 1281 xfs_fsblock_t nextbno;
1282 xfs_extnum_t num_recs; 1282 xfs_extnum_t num_recs;
1283 xfs_extnum_t start;
1284 1283
1285 num_recs = xfs_btree_get_numrecs(block); 1284 num_recs = xfs_btree_get_numrecs(block);
1286 if (unlikely(i + num_recs > room)) { 1285 if (unlikely(i + num_recs > room)) {
@@ -1303,7 +1302,6 @@ xfs_bmap_read_extents(
1303 * Copy records into the extent records. 1302 * Copy records into the extent records.
1304 */ 1303 */
1305 frp = XFS_BMBT_REC_ADDR(mp, block, 1); 1304 frp = XFS_BMBT_REC_ADDR(mp, block, 1);
1306 start = i;
1307 for (j = 0; j < num_recs; j++, i++, frp++) { 1305 for (j = 0; j < num_recs; j++, i++, frp++) {
1308 xfs_bmbt_rec_host_t *trp = xfs_iext_get_ext(ifp, i); 1306 xfs_bmbt_rec_host_t *trp = xfs_iext_get_ext(ifp, i);
1309 trp->l0 = be64_to_cpu(frp->l0); 1307 trp->l0 = be64_to_cpu(frp->l0);
@@ -2065,8 +2063,10 @@ xfs_bmap_add_extent_delay_real(
2065 } 2063 }
2066 temp = xfs_bmap_worst_indlen(bma->ip, temp); 2064 temp = xfs_bmap_worst_indlen(bma->ip, temp);
2067 temp2 = xfs_bmap_worst_indlen(bma->ip, temp2); 2065 temp2 = xfs_bmap_worst_indlen(bma->ip, temp2);
2068 diff = (int)(temp + temp2 - startblockval(PREV.br_startblock) - 2066 diff = (int)(temp + temp2 -
2069 (bma->cur ? bma->cur->bc_private.b.allocated : 0)); 2067 (startblockval(PREV.br_startblock) -
2068 (bma->cur ?
2069 bma->cur->bc_private.b.allocated : 0)));
2070 if (diff > 0) { 2070 if (diff > 0) {
2071 error = xfs_mod_fdblocks(bma->ip->i_mount, 2071 error = xfs_mod_fdblocks(bma->ip->i_mount,
2072 -((int64_t)diff), false); 2072 -((int64_t)diff), false);
@@ -2123,7 +2123,6 @@ xfs_bmap_add_extent_delay_real(
2123 temp = da_new; 2123 temp = da_new;
2124 if (bma->cur) 2124 if (bma->cur)
2125 temp += bma->cur->bc_private.b.allocated; 2125 temp += bma->cur->bc_private.b.allocated;
2126 ASSERT(temp <= da_old);
2127 if (temp < da_old) 2126 if (temp < da_old)
2128 xfs_mod_fdblocks(bma->ip->i_mount, 2127 xfs_mod_fdblocks(bma->ip->i_mount,
2129 (int64_t)(da_old - temp), false); 2128 (int64_t)(da_old - temp), false);