summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-02-28 10:15:28 -0800
committerJens Axboe <axboe@kernel.dk>2018-02-28 12:23:35 -0700
commit0fa8ebdd4244b8e652cc5341c3d5b4b06f84a637 (patch)
tree40196500ad069fdfe6b518ba91ad21aa59d575a3 /drivers/block
parent24941b90e639df2bf467531601a15d792eaa6d6b (diff)
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 87855b5123a6..9d29aa6413e5 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1864,8 +1864,8 @@ out:
static void loop_remove(struct loop_device *lo)
{
- blk_cleanup_queue(lo->lo_queue);
del_gendisk(lo->lo_disk);
+ blk_cleanup_queue(lo->lo_queue);
blk_mq_free_tag_set(&lo->tag_set);
put_disk(lo->lo_disk);
kfree(lo);