]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/md/bcache/alloc.c
bcache: add wait_for_kthread_stop() in bch_allocator_thread()
[mirror_ubuntu-bionic-kernel.git] / drivers / md / bcache / alloc.c
index 004cc3cc6123b0b3a9f9ea51e95c37f109315e41..7fa2631b422c89a160a6e49165bcf639d7d235e2 100644 (file)
@@ -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 @@ retry_invalidate:
                        bch_prio_write(ca);
                }
        }
+out:
+       wait_for_kthread_stop();
+       return 0;
 }
 
 /* Allocation */