summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-12 14:13:45 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:29 -0400
commit538abcb8a1dfcd8473a90d931b8603e4a03812ca (patch)
treef58bf99df474179445d70073a6c542de310bcc36 /fs
parent821a99b7ba6802d43f980a8312cd25694b7ea076 (diff)
bcachefs: Fix a debug assertion
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/btree_iter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index a91cee797703..8aaaa6615eff 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -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)));
}