summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-10-03 15:33:43 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-10-03 15:33:43 -0400
commite18d6152ff0f41b7f01f9817372022df04e0d354 (patch)
tree9ddc6841785bb3349933c6d832e722ba91cea131 /block/genhd.c
parentfe4d9e4abf622598bd199d0805d20afa12f70c92 (diff)
parentb60ca69715fcc39a5f4bdd56ca2ea691b7358455 (diff)
downloadlinux-stable-e18d6152ff0f41b7f01f9817372022df04e0d354.tar.gz
linux-stable-e18d6152ff0f41b7f01f9817372022df04e0d354.tar.bz2
linux-stable-e18d6152ff0f41b7f01f9817372022df04e0d354.zip
Merge tag 'kvm-riscv-6.1-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv changes for 6.1 - Improved instruction encoding infrastructure for instructions not yet supported by binutils - Svinval support for both KVM Host and KVM Guest - Zihintpause support for KVM Guest - Zicbom support for KVM Guest - Record number of signal exits as a VCPU stat - Use generic guest entry infrastructure
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index d36fabf0abc1..988ba52fd331 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -602,7 +602,6 @@ void del_gendisk(struct gendisk *disk)
* Prevent new I/O from crossing bio_queue_enter().
*/
blk_queue_start_drain(q);
- blk_mq_freeze_queue_wait(q);
if (!(disk->flags & GENHD_FL_HIDDEN)) {
sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
@@ -626,6 +625,8 @@ void del_gendisk(struct gendisk *disk)
pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);
device_del(disk_to_dev(disk));
+ blk_mq_freeze_queue_wait(q);
+
blk_throtl_cancel_bios(disk->queue);
blk_sync_queue(q);