bcachefs: Add a kthread_should_stop() check to allocator thread
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 17 Jun 2020 22:20:26 +0000 (18:20 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:41 +0000 (17:08 -0400)
commiteff508b459fb90682c7a5c4e6d2de0b1d18217e4
tree2abf7b1ce47b17911d9f5f31aa6f0780bcabd02c
parenta34782a0663cc3a5d8c4e4657480fa0e6ddc8a16
bcachefs: Add a kthread_should_stop() check to allocator thread

Turns out it's possible during shutdown for the allocator to get stuck
spinning on bch2_invalidate_buckets() without hitting any of the other
checks.

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