xfs: xrep_reap_extents should not destroy the bitmap
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 17 Mar 2020 00:12:34 +0000 (17:12 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 18 Mar 2020 15:12:23 +0000 (08:12 -0700)
Remove the xfs_bitmap_destroy call from the end of xrep_reap_extents
because this sort of violates our rule that the function initializing a
structure should destroy it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/repair.c

index 73e6efd..fb61520 100644 (file)
@@ -696,7 +696,7 @@ xrep_agfl(
                goto err;
 
        /* Dump any AGFL overflow. */
-       return xrep_reap_extents(sc, &agfl_extents, &XFS_RMAP_OINFO_AG,
+       error = xrep_reap_extents(sc, &agfl_extents, &XFS_RMAP_OINFO_AG,
                        XFS_AG_RESV_AGFL);
 err:
        xfs_bitmap_destroy(&agfl_extents);
index 0d5509b..4ff2450 100644 (file)
@@ -617,11 +617,9 @@ xrep_reap_extents(
 
                error = xrep_reap_block(sc, fsbno, oinfo, type);
                if (error)
-                       goto out;
+                       break;
        }
 
-out:
-       xfs_bitmap_destroy(bitmap);
        return error;
 }