bcachefs: Add a lock to bch_page_state
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 9 Oct 2019 13:19:06 +0000 (09:19 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:29 +0000 (17:08 -0400)
commit3826ee0b17557e85813378be5a5a695baf607c1c
treea8bcdd5b38a2412f3213f116e8a2568b816cee84
parent43de7376f36c236255b7daf88e8286720426568b
bcachefs: Add a lock to bch_page_state

We can't use the page lock to protect it, because on writeback IO error
we need to access the page state before calling end_page_writeback() and
the page lock semantics are completely insane so that deadlocks.

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