block/loop: Delete gendisk before cleaning up the request queue
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 28 Feb 2018 18:15:28 +0000 (10:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Feb 2018 19:23:35 +0000 (12:23 -0700)
commit0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637
tree40196500ad069fdfe6b518ba91ad21aa59d575a3
parent24941b90e639df2bf467531601a15d792eaa6d6b
block/loop: Delete gendisk before cleaning up the request queue

Remove the disk, partition and bdi sysfs attributes before cleaning up
the request queue associated with the disk.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: Shaohua Li <shli@fb.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c