diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-06-19 12:32:13 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-06-19 12:32:13 +0200 |
commit | bcb7416e3480c1abb46266bdab874b3b3d6124cb (patch) | |
tree | 9d889b14957c0e266697d0674675bc42b0899571 /drivers/md/bcache/sysfs.c | |
parent | drm/vc4: hdmi: Set default state margin at reset (diff) | |
parent | Merge v5.2-rc5 into drm-next (diff) | |
download | linux-bcb7416e3480c1abb46266bdab874b3b3d6124cb.tar.xz linux-bcb7416e3480c1abb46266bdab874b3b3d6124cb.zip |
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
remove-fbcon-notifiers topic branch is based on rc4, so we need a fresh
backmerge of drm-next to pull it in.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/md/bcache/sysfs.c')
-rw-r--r-- | drivers/md/bcache/sysfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 6cd44d3cf906..bfb437ffb13c 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -431,8 +431,13 @@ STORE(bch_cached_dev) bch_writeback_queue(dc); } + /* + * Only set BCACHE_DEV_WB_RUNNING when cached device attached to + * a cache set, otherwise it doesn't make sense. + */ if (attr == &sysfs_writeback_percent) - if (!test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)) + if ((dc->disk.c != NULL) && + (!test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags))) schedule_delayed_work(&dc->writeback_rate_update, dc->writeback_rate_update_seconds * HZ); |