aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-12 01:26:24 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-12 01:26:24 -0400
commitd0a9d795729945fc7eea77387af7780a5a0ec4c5 (patch)
treefec26a3e168cedeff0b5e6dcec2c8fb5e123a188
parent580c4ff9484ac3395ad48b1118b269a6d68c9318 (diff)
xfs: use ->t_firstblock in insert/collapse range
Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r--fs/xfs/xfs_bmap_util.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 0b2b52854061..d98f6e3065db 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1311,7 +1311,6 @@ xfs_collapse_file_space(
1311 struct xfs_trans *tp; 1311 struct xfs_trans *tp;
1312 int error; 1312 int error;
1313 struct xfs_defer_ops dfops; 1313 struct xfs_defer_ops dfops;
1314 xfs_fsblock_t first_block;
1315 xfs_fileoff_t next_fsb = XFS_B_TO_FSB(mp, offset + len); 1314 xfs_fileoff_t next_fsb = XFS_B_TO_FSB(mp, offset + len);
1316 xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len); 1315 xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len);
1317 uint resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0); 1316 uint resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0);
@@ -1344,9 +1343,9 @@ xfs_collapse_file_space(
1344 goto out_trans_cancel; 1343 goto out_trans_cancel;
1345 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 1344 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
1346 1345
1347 xfs_defer_init(tp, &dfops, &first_block); 1346 xfs_defer_init(tp, &dfops, &tp->t_firstblock);
1348 error = xfs_bmap_collapse_extents(tp, ip, &next_fsb, shift_fsb, 1347 error = xfs_bmap_collapse_extents(tp, ip, &next_fsb, shift_fsb,
1349 &done, &first_block); 1348 &done, &tp->t_firstblock);
1350 if (error) 1349 if (error)
1351 goto out_bmap_cancel; 1350 goto out_bmap_cancel;
1352 1351
@@ -1387,7 +1386,6 @@ xfs_insert_file_space(
1387 struct xfs_trans *tp; 1386 struct xfs_trans *tp;
1388 int error; 1387 int error;
1389 struct xfs_defer_ops dfops; 1388 struct xfs_defer_ops dfops;
1390 xfs_fsblock_t first_block;
1391 xfs_fileoff_t stop_fsb = XFS_B_TO_FSB(mp, offset); 1389 xfs_fileoff_t stop_fsb = XFS_B_TO_FSB(mp, offset);
1392 xfs_fileoff_t next_fsb = NULLFSBLOCK; 1390 xfs_fileoff_t next_fsb = NULLFSBLOCK;
1393 xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len); 1391 xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len);
@@ -1423,9 +1421,9 @@ xfs_insert_file_space(
1423 1421
1424 xfs_ilock(ip, XFS_ILOCK_EXCL); 1422 xfs_ilock(ip, XFS_ILOCK_EXCL);
1425 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 1423 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
1426 xfs_defer_init(tp, &dfops, &first_block); 1424 xfs_defer_init(tp, &dfops, &tp->t_firstblock);
1427 error = xfs_bmap_insert_extents(tp, ip, &next_fsb, shift_fsb, 1425 error = xfs_bmap_insert_extents(tp, ip, &next_fsb, shift_fsb,
1428 &done, stop_fsb, &first_block); 1426 &done, stop_fsb, &tp->t_firstblock);
1429 if (error) 1427 if (error)
1430 goto out_bmap_cancel; 1428 goto out_bmap_cancel;
1431 1429