bcachefs; Check for allocator thread shutdown
We were missing a kthread_should_stop() check in the loop in bch2_invalidate_buckets(), very occasionally leading to us getting stuck while shutting down. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
d7fc453bdb
commit
01254036a3
@ -836,6 +836,11 @@ static int bch2_invalidate_buckets(struct bch_fs *c, struct bch_dev *ca)
|
||||
while (!ret &&
|
||||
!fifo_full(&ca->free_inc) &&
|
||||
ca->alloc_heap.used) {
|
||||
if (kthread_should_stop()) {
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
ret = bch2_invalidate_one_bucket(c, ca, &journal_seq,
|
||||
(!fifo_empty(&ca->free_inc)
|
||||
? BTREE_INSERT_NOWAIT : 0));
|
||||
|
Loading…
x
Reference in New Issue
Block a user