Message ID | 20180503105137.2922-5-colyli@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c index 004cc3cc6123..7fa2631b422c 100644 --- a/drivers/md/bcache/alloc.c +++ b/drivers/md/bcache/alloc.c @@ -290,7 +290,7 @@ do { \ if (kthread_should_stop() || \ test_bit(CACHE_SET_IO_DISABLE, &ca->set->flags)) { \ set_current_state(TASK_RUNNING); \ - return 0; \ + goto out; \ } \ \ schedule(); \ @@ -378,6 +378,9 @@ static int bch_allocator_thread(void *arg) bch_prio_write(ca); } } +out: + wait_for_kthread_stop(); + return 0; } /* Allocation */