diff options
author | Ming Lei <ming.lei@redhat.com> | 2021-10-26 18:12:04 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-26 08:44:38 -0600 |
commit | d308ae0d299a6bb15be4efb91849582d19c23213 (patch) | |
tree | 3e71ce1f41bdffe3358d4da83d056426a15585de /mm/vmstat.c | |
parent | 9fbfabfda25d8774c5a08634fdd2da000a924890 (diff) | |
download | linux-stable-d308ae0d299a6bb15be4efb91849582d19c23213.tar.gz linux-stable-d308ae0d299a6bb15be4efb91849582d19c23213.tar.bz2 linux-stable-d308ae0d299a6bb15be4efb91849582d19c23213.zip |
block: drain queue after disk is removed from sysfs
Before removing disk from sysfs, userspace still may change queue via
sysfs, such as switching elevator or setting wbt latency, both may
reinitialize wbt, then the warning in blk_free_queue_stats() will be
triggered since rq_qos_exit() is moved to del_gendisk().
Fixes the issue by moving draining queue & tearing down after disk is
removed from sysfs, at that time no one can come into queue's
store()/show().
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Fixes: 8e141f9eb803 ("block: drain file system I/O on del_gendisk")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20211026101204.2897166-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/vmstat.c')
0 files changed, 0 insertions, 0 deletions