diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-08-22 02:49:09 +0200 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 06:56:41 +0100 |
commit | c4d951ddb66fe1d087447b0ba65c4fa4446f1083 (patch) | |
tree | 80564725ffa4cfa0d1a02b0a80f419edcd424548 /drivers/md/bcache/writeback.c | |
parent | bcache: Better full stripe scanning (diff) | |
download | linux-c4d951ddb66fe1d087447b0ba65c4fa4446f1083.tar.xz linux-c4d951ddb66fe1d087447b0ba65c4fa4446f1083.zip |
bcache: Fix sysfs splat on shutdown with flash only devs
Whoops.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/writeback.c')
-rw-r--r-- | drivers/md/bcache/writeback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 22e21dc9a037..99053b1251be 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -89,7 +89,7 @@ static unsigned writeback_delay(struct cached_dev *dc, unsigned sectors) { uint64_t ret; - if (atomic_read(&dc->disk.detaching) || + if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || !dc->writeback_percent) return 0; @@ -404,7 +404,7 @@ static int bch_writeback_thread(void *arg) while (!kthread_should_stop()) { down_write(&dc->writeback_lock); if (!atomic_read(&dc->has_dirty) || - (!atomic_read(&dc->disk.detaching) && + (!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) && !dc->writeback_running)) { up_write(&dc->writeback_lock); set_current_state(TASK_INTERRUPTIBLE); @@ -437,7 +437,7 @@ static int bch_writeback_thread(void *arg) while (delay && !kthread_should_stop() && - !atomic_read(&dc->disk.detaching)) + !test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) delay = schedule_timeout_interruptible(delay); } } |