From 37a6547d92af4d16778cead78ef2f9233f5573fe Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 16 Mar 2020 17:12:34 -0700 Subject: [PATCH] xfs: xrep_reap_extents should not destroy the bitmap 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 Reviewed-by: Brian Foster --- fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/scrub/repair.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 73e6efd76877..fb615207d4a9 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -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); diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 0d5509bf8581..4ff24501e8ac 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -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; } -- GitLab