]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: Fix race in bch2_accounting_mem_insert()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 5 Jun 2024 16:35:48 +0000 (12:35 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:15 +0000 (19:00 -0400)
commitf295920bc4a0f34f7c4182f53c8f0c929e4358a2
tree850d4471eb13cc590c0b9b36e0299cb247d8f346
parent49858d869b62446e552bf9421077fb6c3125b13a
bcachefs: Fix race in bch2_accounting_mem_insert()

bch2_accounting_mem_insert() drops and retakes mark_lock; thus, we need
to check if the entry in question has already been inserted.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_accounting.c
fs/bcachefs/disk_accounting.h