]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: use ->t_firstblock for all xfs_bunmapi() callers
authorBrian Foster <bfoster@redhat.com>
Fri, 5 Oct 2018 02:36:08 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:08 +0000 (21:36 -0500)
Source kernel commit: 372837978d90d1c563315192196735c09623a5d6

Convert all xfs_bunmapi() callers to ->t_firstblock.

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c

index 5964501c0ddb08161c9a9b1b7a00a8c07b7a63a4..2e77d73318f6d5992d897a3aa00a2becb6fff49a 100644 (file)
@@ -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);