summaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-08 17:48:33 +0100
committerJens Axboe <axboe@fb.com>2017-03-08 10:55:17 -0700
commit90f16fddcc2802726142b8386c65ccb89f044613 (patch)
treeda1c8d56ab62dd362dc94fab542ba43a5144f67d /include/linux/genhd.h
parentdf23de55615fa7a190a85f49a950ccecdd9102f3 (diff)
downloadlinux-0-day-90f16fddcc2802726142b8386c65ccb89f044613.tar.gz
linux-0-day-90f16fddcc2802726142b8386c65ccb89f044613.tar.xz
block: Make del_gendisk() safer for disks without queues
Commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()" added disk->queue dereference to del_gendisk(). Although del_gendisk() is not supposed to be called without disk->queue valid and blk_unregister_queue() warns in that case, this change will make it oops instead. Return to the old more robust behavior of just warning when del_gendisk() gets called for gendisk with disk->queue being NULL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz> Tested-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/genhd.h')
0 files changed, 0 insertions, 0 deletions