Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap
Date: Wed, 09 Oct 2019 09:48:40 -0700	[thread overview]
Message-ID: <157063972033.2913192.3828052500812376869.stgit@magnolia> (raw)
In-Reply-To: <157063971218.2913192.8762913814390092382.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

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>
---
 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 7a1a38b636a9..8fcd43040c96 100644
--- a/fs/xfs/scrub/agheader_repair.c
+++ b/fs/xfs/scrub/agheader_repair.c
@@ -698,7 +698,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 b70a88bc975e..3a58788e0bd8 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -613,11 +613,9 @@ xrep_reap_extents(
 
 		error = xrep_reap_block(sc, fsbno, oinfo, type);
 		if (error)
-			goto out;
+			break;
 	}
 
-out:
-	xfs_bitmap_destroy(bitmap);
 	return error;
 }
 


  reply	other threads:[~2019-10-09 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 16:48 [PATCH 0/3] xfs: fix online repair block reaping Darrick J. Wong
2019-10-09 16:48 ` Darrick J. Wong [this message]
2019-10-17 12:54   ` [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap Brian Foster
2019-10-09 16:48 ` [PATCH 2/3] xfs: only invalidate blocks if we're going to free them Darrick J. Wong
2019-10-17 12:55   ` Brian Foster
2019-10-25 20:22     ` Darrick J. Wong
2019-10-09 16:48 ` [PATCH 3/3] xfs: use deferred frees to reap old btree blocks Darrick J. Wong
2019-10-17 12:55   ` Brian Foster
2019-10-17 15:06     ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2019-10-29 23:30 [PATCH v2 0/3] xfs: fix online repair block reaping Darrick J. Wong
2019-10-29 23:30 ` [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap Darrick J. Wong
2020-01-01  1:01 [PATCH v2 0/3] xfs: fix online repair block reaping Darrick J. Wong
2020-01-01  1:01 ` [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157063972033.2913192.3828052500812376869.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox