diff options
| -rw-r--r-- | drivers/md/bcache/alloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 { \ | |||
| 290 | if (kthread_should_stop() || \ | 290 | if (kthread_should_stop() || \ |
| 291 | test_bit(CACHE_SET_IO_DISABLE, &ca->set->flags)) { \ | 291 | test_bit(CACHE_SET_IO_DISABLE, &ca->set->flags)) { \ |
| 292 | set_current_state(TASK_RUNNING); \ | 292 | set_current_state(TASK_RUNNING); \ |
| 293 | return 0; \ | 293 | goto out; \ |
| 294 | } \ | 294 | } \ |
| 295 | \ | 295 | \ |
| 296 | schedule(); \ | 296 | schedule(); \ |
| @@ -378,6 +378,9 @@ retry_invalidate: | |||
| 378 | bch_prio_write(ca); | 378 | bch_prio_write(ca); |
| 379 | } | 379 | } |
| 380 | } | 380 | } |
| 381 | out: | ||
| 382 | wait_for_kthread_stop(); | ||
| 383 | return 0; | ||
| 381 | } | 384 | } |
| 382 | 385 | ||
| 383 | /* Allocation */ | 386 | /* Allocation */ |
