mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
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>
This commit is contained in:
parent
a34782a066
commit
eff508b459
1 changed files with 2 additions and 0 deletions
|
@ -1104,6 +1104,8 @@ static int bch2_allocator_thread(void *arg)
|
|||
|
||||
while (1) {
|
||||
cond_resched();
|
||||
if (kthread_should_stop())
|
||||
break;
|
||||
|
||||
pr_debug("discarding %zu invalidated buckets",
|
||||
fifo_used(&ca->free_inc));
|
||||
|
|
Loading…
Reference in a new issue