lkml.org 
[lkml]   [2017]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 3.16 102/133] bcache: fix crash on shutdown in passthrough mode
3.16.51-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Slava Pestov <sp@daterainc.com>

commit a664d0f05a2ec02c8f042db536d84d15d6e19e81 upstream.

We never started the writeback thread in this case, so don't stop it.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/md/bcache/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1073,7 +1073,8 @@ static void cached_dev_free(struct closu
struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl);

cancel_delayed_work_sync(&dc->writeback_rate_update);
- kthread_stop(dc->writeback_thread);
+ if (!IS_ERR_OR_NULL(dc->writeback_thread))
+ kthread_stop(dc->writeback_thread);

mutex_lock(&bch_register_lock);

\
 
 \ /
  Last update: 2017-11-22 03:36    [W:0.326 / U:27.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site