All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, Brian Foster <bfoster@redhat.com>
Subject: [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap
Date: Tue, 31 Dec 2019 17:01:24 -0800	[thread overview]
Message-ID: <157784048460.1357430.2294347936319130263.stgit@magnolia> (raw)
In-Reply-To: <157784047838.1357430.18292934559846279176.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>
Reviewed-by: Brian Foster <bfoster@redhat.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:[~2020-01-01  1:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01  1:01 [PATCH v2 0/3] xfs: fix online repair block reaping Darrick J. Wong
2020-01-01  1:01 ` Darrick J. Wong [this message]
2020-01-01  1:01 ` [PATCH 2/3] xfs: only invalidate blocks if we're going to free them Darrick J. Wong
2020-01-01  1:01 ` [PATCH 3/3] xfs: use deferred frees to reap old btree blocks 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
2019-10-09 16:48 [PATCH 0/3] xfs: fix online repair block reaping Darrick J. Wong
2019-10-09 16:48 ` [PATCH 1/3] xfs: xrep_reap_extents should not destroy the bitmap Darrick J. Wong
2019-10-17 12:54   ` Brian Foster

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=157784048460.1357430.2294347936319130263.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=bfoster@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.