summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:27 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:27 -0700
commit4b77a088d781b53d263c37e75222439297b410e5 (patch)
tree59a3360882bec291eea06d07271ef7e428fab496 /fs/xfs
parent333f950c89a17018f812eae13daaa2a404c413c1 (diff)
xfs: use ->t_firstblock in bmap extent split
Also remove the unnecessary xfs_bmap_split_extent_at() parameter. 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/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 5b4bee4645df..6e8254599fab 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5878,8 +5878,7 @@ STATIC int
xfs_bmap_split_extent_at(
struct xfs_trans *tp,
struct xfs_inode *ip,
- xfs_fileoff_t split_fsb,
- xfs_fsblock_t *firstfsb)
+ xfs_fileoff_t split_fsb)
{
int whichfork = XFS_DATA_FORK;
struct xfs_btree_cur *cur = NULL;
@@ -5928,7 +5927,7 @@ xfs_bmap_split_extent_at(
if (ifp->if_flags & XFS_IFBROOT) {
cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
- cur->bc_private.b.firstblock = *firstfsb;
+ cur->bc_private.b.firstblock = tp->t_firstblock;
cur->bc_private.b.flags = 0;
error = xfs_bmbt_lookup_eq(cur, &got, &i);
if (error)
@@ -5972,8 +5971,8 @@ xfs_bmap_split_extent_at(
int tmp_logflags; /* partial log flag return val */
ASSERT(cur == NULL);
- error = xfs_bmap_extents_to_btree(tp, ip, firstfsb, &cur, 0,
- &tmp_logflags, whichfork);
+ error = xfs_bmap_extents_to_btree(tp, ip, &tp->t_firstblock,
+ &cur, 0, &tmp_logflags, whichfork);
logflags |= tmp_logflags;
}
@@ -5997,20 +5996,18 @@ xfs_bmap_split_extent(
struct xfs_mount *mp = ip->i_mount;
struct xfs_trans *tp;
struct xfs_defer_ops dfops;
- xfs_fsblock_t firstfsb;
int error;
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write,
XFS_DIOSTRAT_SPACE_RES(mp, 0), 0, 0, &tp);
if (error)
return error;
- xfs_defer_init(tp, &dfops, &firstfsb);
+ xfs_defer_init(tp, &dfops, &tp->t_firstblock);
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
- error = xfs_bmap_split_extent_at(tp, ip, split_fsb,
- &firstfsb);
+ error = xfs_bmap_split_extent_at(tp, ip, split_fsb);
if (error)
goto out;