[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 04 Apr 2013 22:01:14 +0800
From: Aaron Lu <aaron.lu@...el.com>
To: Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alan Stern <stern@...land.harvard.edu>
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@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists