bcachefs: Fix for hash_redo_key() in fsck
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 10 Feb 2021 00:54:40 +0000 (19:54 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:53 +0000 (17:08 -0400)
It's possible we're calling hash_redo_key() because of a duplicate key -
easiest fix for that is to just not use BCH_HASH_SET_MUST_CREATE.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c

index df0f00f..c3e6137 100644 (file)
@@ -193,7 +193,7 @@ static int hash_redo_key(const struct bch_hash_desc desc,
        bch2_trans_update(trans, k_iter, &delete, 0);
 
        return bch2_hash_set(trans, desc, &h->info, k_iter->pos.inode,
-                            tmp, BCH_HASH_SET_MUST_CREATE);
+                            tmp, 0);
 }
 
 static int fsck_hash_delete_at(struct btree_trans *trans,