xfs: remove the xfs_iext_peek_prev_extent call in xfs_bmapi_allocate
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Apr 2024 06:15:26 +0000 (08:15 +0200)
committerChandan Babu R <chandanbabu@kernel.org>
Tue, 30 Apr 2024 04:15:19 +0000 (09:45 +0530)
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>
fs/xfs/libxfs/xfs_bmap.c

index c4126f37dea3c2ac9574c1d7883f8193d016b3fd..d0aa64b73c788ea823e8713b97c340655daabf4a 100644 (file)
@@ -4187,11 +4187,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