diff options
author | Brian Foster <bfoster@redhat.com> | 2018-07-11 22:26:24 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-11 22:26:24 -0700 |
commit | d0a9d795729945fc7eea77387af7780a5a0ec4c5 (patch) | |
tree | fec26a3e168cedeff0b5e6dcec2c8fb5e123a188 /fs | |
parent | 580c4ff9484ac3395ad48b1118b269a6d68c9318 (diff) | |
download | linux-d0a9d795729945fc7eea77387af7780a5a0ec4c5.tar.gz linux-d0a9d795729945fc7eea77387af7780a5a0ec4c5.tar.bz2 linux-d0a9d795729945fc7eea77387af7780a5a0ec4c5.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 10 |
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( struct xfs_trans *tp; int error; struct xfs_defer_ops dfops; - xfs_fsblock_t first_block; xfs_fileoff_t next_fsb = XFS_B_TO_FSB(mp, offset + len); xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len); uint resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0); @@ -1344,9 +1343,9 @@ xfs_collapse_file_space( goto out_trans_cancel; xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); - xfs_defer_init(tp, &dfops, &first_block); + xfs_defer_init(tp, &dfops, &tp->t_firstblock); error = xfs_bmap_collapse_extents(tp, ip, &next_fsb, shift_fsb, - &done, &first_block); + &done, &tp->t_firstblock); if (error) goto out_bmap_cancel; @@ -1387,7 +1386,6 @@ xfs_insert_file_space( struct xfs_trans *tp; int error; struct xfs_defer_ops dfops; - xfs_fsblock_t first_block; xfs_fileoff_t stop_fsb = XFS_B_TO_FSB(mp, offset); xfs_fileoff_t next_fsb = NULLFSBLOCK; xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len); @@ -1423,9 +1421,9 @@ xfs_insert_file_space( xfs_ilock(ip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); - xfs_defer_init(tp, &dfops, &first_block); + xfs_defer_init(tp, &dfops, &tp->t_firstblock); error = xfs_bmap_insert_extents(tp, ip, &next_fsb, shift_fsb, - &done, stop_fsb, &first_block); + &done, stop_fsb, &tp->t_firstblock); if (error) goto out_bmap_cancel; |