bcachefs: Fix a debug assertion

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-10-12 14:13:45 -04:00 committed by Kent Overstreet
parent 821a99b7ba
commit 538abcb8a1

View file

@ -1359,6 +1359,13 @@ static inline struct bkey_s_c btree_iter_peek_uptodate(struct btree_iter *iter)
if (debug_check_iterators(iter->trans->c)) {
struct bkey k = bkey_unpack_key(l->b, _k);
/*
* this flag is internal to the btree code,
* we don't care if it doesn't match - if it's now set
* it just means the key has been written out to disk:
*/
k.needs_whiteout = iter->k.needs_whiteout;
BUG_ON(memcmp(&k, &iter->k, sizeof(k)));
}