diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-01 22:46:42 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:50 +0200 |
commit | 419fc65f8cfbadb29b2024457bf914787af8db91 (patch) | |
tree | ab099aad967756fd061af4f844aa68264e92a1a1 /fs/bcachefs/fsck.c | |
parent | bcachefs: Don't emit tracepoints for expected events (diff) | |
download | linux-419fc65f8cfbadb29b2024457bf914787af8db91.tar.xz linux-419fc65f8cfbadb29b2024457bf914787af8db91.zip |
bcachefs: Fix hash_check_key()
On hash collision when we have to check for duplicates or incorrect
hash value, we weren't specifying a snapshot ID to iterate with.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/fsck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 0124aa0b14c5..e0d7ab67ca35 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -821,7 +821,7 @@ static int hash_check_key(struct btree_trans *trans, goto bad_hash; for_each_btree_key_norestart(trans, iter, desc.btree_id, - POS(hash_k.k->p.inode, hash), + SPOS(hash_k.k->p.inode, hash, hash_k.k->p.snapshot), BTREE_ITER_SLOTS, k, ret) { if (bkey_eq(k.k->p, hash_k.k->p)) break; |