mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
bcachefs: Fix verify_update_old_key()
This fixes a very-rare race in our assertion, with needs_whiteout being modified in the btree key. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3ea4219d98
commit
70f0b0fd7e
|
|
@ -56,9 +56,10 @@ static void verify_update_old_key(struct btree_trans *trans, struct btree_insert
|
|||
k = bkey_i_to_s_c(j_k);
|
||||
}
|
||||
|
||||
i->old_k.needs_whiteout = k.k->needs_whiteout;
|
||||
u = *k.k;
|
||||
u.needs_whiteout = i->old_k.needs_whiteout;
|
||||
|
||||
BUG_ON(memcmp(&i->old_k, k.k, sizeof(struct bkey)));
|
||||
BUG_ON(memcmp(&i->old_k, &u, sizeof(struct bkey)));
|
||||
BUG_ON(i->old_v != k.v);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user