Messages in this thread Patch in this message | | | Date | Thu, 04 Apr 2013 22:01:14 +0800 | From | Aaron Lu <> | Subject | [PATCH] blk: start bypass mode in blk_unregister_queue |
| |
In blk_register_queue, we will end bypass mode for the queue; but in blk_unregister_queue, we didn't start bypass mode for it. This would cause the WARN_ON_ONCE(q->bypass_depth < 0) to trigger if the queue gets registered, unregistered and then again registered, e.g. unload scsi cdrom module driver sr_mod and then reload it will trigger such a warning.
Signed-off-by: Aaron Lu <aaron.lu@intel.com> --- block/blk-sysfs.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 6206a93..bd322a1 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -615,4 +615,6 @@ void blk_unregister_queue(struct gendisk *disk) kobject_del(&q->kobj); blk_trace_remove_sysfs(disk_to_dev(disk)); kobject_put(&disk_to_dev(disk)->kobj); + + blk_queue_bypass_start(q); } -- 1.8.1.5
| |