From: Darrick J. Wong Date: Tue, 17 Mar 2020 00:12:34 +0000 (-0700) Subject: xfs: xrep_reap_extents should not destroy the bitmap X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=37a6547d92af4d16778cead78ef2f9233f5573fe;p=linux.git 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 --- diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 73e6efd768774..fb615207d4a9f 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 0d5509bf8581f..4ff24501e8ac0 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; }