diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-02 00:46:42 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:50 +0300 |
commit | 419fc65f8cfbadb29b2024457bf914787af8db91 (patch) | |
tree | ab099aad967756fd061af4f844aa68264e92a1a1 /fs | |
parent | b8c5b16f970b32a5b8e8d75a9e4b96041db73d43 (diff) | |
download | linux-419fc65f8cfbadb29b2024457bf914787af8db91.tar.xz |
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 'fs')
-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; |