bcache: Fix a shutdown bug

Shutdown wasn't cancelling/waiting on journal_write_work()

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2014-02-19 19:48:26 -08:00
parent 1b4eaf3d38
commit dabb443340
3 changed files with 12 additions and 2 deletions

View File

@@ -1403,6 +1403,10 @@ static void cache_set_flush(struct closure *cl)
if (ca->alloc_thread)
kthread_stop(ca->alloc_thread);
cancel_delayed_work_sync(&c->journal.work);
/* flush last journal entry if needed */
c->journal.work.work.func(&c->journal.work.work);
closure_return(cl);
}