summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/writeback.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-08-22 02:49:09 +0200
committerKent Overstreet <kmo@daterainc.com>2013-11-11 06:56:41 +0100
commitc4d951ddb66fe1d087447b0ba65c4fa4446f1083 (patch)
tree80564725ffa4cfa0d1a02b0a80f419edcd424548 /drivers/md/bcache/writeback.h
parentbcache: Better full stripe scanning (diff)
downloadlinux-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.h')
-rw-r--r--drivers/md/bcache/writeback.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/writeback.h b/drivers/md/bcache/writeback.h
index fe7d9d56492b..c9ddcf4614b9 100644
--- a/drivers/md/bcache/writeback.h
+++ b/drivers/md/bcache/writeback.h
@@ -45,7 +45,7 @@ static inline bool should_writeback(struct cached_dev *dc, struct bio *bio,
unsigned in_use = dc->disk.c->gc_stats.in_use;
if (cache_mode != CACHE_MODE_WRITEBACK ||
- atomic_read(&dc->disk.detaching) ||
+ test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) ||
in_use > CUTOFF_WRITEBACK_SYNC)
return false;