diff options
author | Coly Li <colyli@suse.de> | 2019-06-28 14:59:47 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-28 16:39:16 +0300 |
commit | 97ba3b816e2cdea798398bc8486125f79f2453c1 (patch) | |
tree | 26e65edffab7d5f9a61d55eceef7a6449da427c6 /drivers/atm/he.h | |
parent | a59ff6ccc2bf2e2934b31bbf734f0bc04b5ec78a (diff) | |
download | linux-97ba3b816e2cdea798398bc8486125f79f2453c1.tar.xz |
bcache: acquire bch_register_lock later in cached_dev_detach_finish()
Now there is variable bcache_is_reboot to prevent device register or
unregister during reboot, it is unncessary to still hold mutex lock
bch_register_lock before stopping writeback_rate_update kworker and
writeback kthread. And if the stopping kworker or kthread holding
bch_register_lock inside their routine (we used to have such problem
in writeback thread, thanks to Junhui Wang fixed it), it is very easy
to introduce deadlock during reboot/shutdown procedure.
Therefore in this patch, the location to acquire bch_register_lock is
moved to the location before calling calc_cached_dev_sectors(). Which
is later then original location in cached_dev_detach_finish().
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/atm/he.h')
0 files changed, 0 insertions, 0 deletions