Commit f2e8c69f authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't lose needs_whiteout in overwrite path

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a7b96ab0
...@@ -99,13 +99,14 @@ bool bch2_btree_bset_insert_key(struct btree_iter *iter, ...@@ -99,13 +99,14 @@ bool bch2_btree_bset_insert_key(struct btree_iter *iter,
} }
insert->k.needs_whiteout = k->needs_whiteout;
k->needs_whiteout = false;
if (k >= btree_bset_last(b)->start) { if (k >= btree_bset_last(b)->start) {
clobber_u64s = k->u64s; clobber_u64s = k->u64s;
goto overwrite; goto overwrite;
} }
insert->k.needs_whiteout = k->needs_whiteout;
k->needs_whiteout = false;
k->type = KEY_TYPE_deleted; k->type = KEY_TYPE_deleted;
/* /*
* XXX: we should be able to do this without two calls to * XXX: we should be able to do this without two calls to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment