summaryrefslogtreecommitdiff
path: root/fs/bcachefs/backpointers.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-27 16:20:05 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:05 -0400
commit1fa3e87ac50a24a4f6a71986a4d9bc2f16d0667e (patch)
tree40ef3f13a8e1f1d228930d5439ed9184444ed5b7 /fs/bcachefs/backpointers.c
parentb3591acc3bc25d120dd9cb72f462e009e046a254 (diff)
bcachefs: Fix leak in backpointers fsck
We were forgetting to exit a printbuf - whoops. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/backpointers.c')
-rw-r--r--fs/bcachefs/backpointers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
index 2641ebef6ae4..a270ff96e9b4 100644
--- a/fs/bcachefs/backpointers.c
+++ b/fs/bcachefs/backpointers.c
@@ -811,8 +811,10 @@ static int check_one_backpointer(struct btree_trans *trans,
if (fsck_err_on(!k.k, c,
"backpointer for missing extent\n %s",
- (bch2_bkey_val_to_text(&buf, c, bp.s_c), buf.buf)))
- return bch2_btree_delete_at_buffered(trans, BTREE_ID_backpointers, bp.k->p);
+ (bch2_bkey_val_to_text(&buf, c, bp.s_c), buf.buf))) {
+ ret = bch2_btree_delete_at_buffered(trans, BTREE_ID_backpointers, bp.k->p);
+ goto out;
+ }
out:
fsck_err:
bch2_trans_iter_exit(trans, &iter);