Commit 389c92b3 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Clear k->needs_whitout earlier in commit path

The upcoming btree write buffer rework is going to use the journal
itself as the first stage of the write buffer; this is a cleanup to make
sure k->needs_whiteout is initialized before keys hit the journal.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 066a2646
......@@ -655,6 +655,8 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags,
*stopped_at = i;
return ret;
}
i->k->k.needs_whiteout = false;
}
if (trans->nr_wb_updates &&
......@@ -777,8 +779,6 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags,
}
trans_for_each_update(trans, i) {
i->k->k.needs_whiteout = false;
if (!i->cached) {
u64 seq = trans->journal_res.seq;
......
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