]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove the xfs_iext_peek_prev_extent call in xfs_bmapi_allocate
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Jul 2024 23:22:55 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:04 +0000 (17:01 -0700)
Source kernel commit: a8bb258f703f42c322638022afa16808ca4a7d25

Both callers of xfs_bmapi_allocate already initialize bma->prev, don't
redo that in xfs_bmapi_allocate.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
libxfs/xfs_bmap.c

index a498894fc3607d38201893bfc4bcea25571ac5b3..4279ab83df562f176bcd6e1099980e2865dfd443 100644 (file)
@@ -4181,11 +4181,6 @@ xfs_bmapi_allocate(
        ASSERT(bma->length > 0);
        ASSERT(bma->length <= XFS_MAX_BMBT_EXTLEN);
 
-       if (bma->wasdel) {
-               if (!xfs_iext_peek_prev_extent(ifp, &bma->icur, &bma->prev))
-                       bma->prev.br_startoff = NULLFILEOFF;
-       }
-
        if (bma->flags & XFS_BMAPI_CONTIG)
                bma->minlen = bma->length;
        else