mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
066a26460b
commit
389c92b36e
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue