From: Brian Foster Date: Fri, 5 Oct 2018 02:36:08 +0000 (-0500) Subject: xfs: use ->t_firstblock for all xfs_bunmapi() callers X-Git-Tag: v4.19.0-rc0~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35f576619da6cb81b740280ac818f092aca7a336;p=thirdparty%2Fxfsprogs-dev.git xfs: use ->t_firstblock for all xfs_bunmapi() callers Source kernel commit: 372837978d90d1c563315192196735c09623a5d6 Convert all xfs_bunmapi() callers to ->t_firstblock. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 5964501c0..2e77d7331 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -6123,17 +6123,9 @@ xfs_bmap_finish_one( xfs_filblks_t *blockcount, xfs_exntst_t state) { - xfs_fsblock_t firstfsb; int error = 0; - /* - * firstfsb is tied to the transaction lifetime and is used to - * ensure correct AG locking order and schedule work item - * continuations. XFS_BUI_MAX_FAST_EXTENTS (== 1) restricts us - * to only making one bmap call per transaction, so it should - * be safe to have it as a local variable here. - */ - firstfsb = NULLFSBLOCK; + ASSERT(tp->t_firstblock == NULLFSBLOCK); trace_xfs_bmap_deferred(tp->t_mountp, XFS_FSB_TO_AGNO(tp->t_mountp, startblock), type, @@ -6156,7 +6148,7 @@ xfs_bmap_finish_one( break; case XFS_BMAP_UNMAP: error = __xfs_bunmapi(tp, ip, startoff, blockcount, - XFS_BMAPI_REMAP, 1, &firstfsb); + XFS_BMAPI_REMAP, 1, &tp->t_firstblock); break; default: ASSERT(0);