aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-30 19:09:11 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-01 00:03:12 -0400
commit132263220ddacaa5d4a93c34675eb9639dcc3707 (patch)
tree6ee05282b250d0823510938d417002b32e568158
parentbcachefs: Replace rcu_read_lock() with guards (diff)
downloadwireguard-linux-132263220ddacaa5d4a93c34675eb9639dcc3707.tar.xz
wireguard-linux-132263220ddacaa5d4a93c34675eb9639dcc3707.zip
bcachefs: Add better logging to fsck_rename_dirent()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/str_hash.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/bcachefs/str_hash.c b/fs/bcachefs/str_hash.c
index f101ca8581d9..7b97852d1cdf 100644
--- a/fs/bcachefs/str_hash.c
+++ b/fs/bcachefs/str_hash.c
@@ -61,14 +61,19 @@ static noinline int fsck_rename_dirent(struct btree_trans *trans,
(subvol_inum) { 0, old.k->p.inode },
old.k->p.snapshot, &new->k_i,
BTREE_UPDATE_internal_snapshot_node);
- if (!bch2_err_matches(ret, EEXIST))
+ if (ret && !bch2_err_matches(ret, EEXIST))
+ goto err;
+ if (!ret)
break;
}
if (ret)
- return ret;
+ goto err;
- return bch2_fsck_update_backpointers(trans, s, desc, hash_info, &new->k_i);
+ ret = bch2_fsck_update_backpointers(trans, s, desc, hash_info, &new->k_i);
+err:
+ bch_err_fn(trans->c, ret);
+ return ret;
}
static noinline int hash_pick_winner(struct btree_trans *trans,