pcd: fix ordering of unregister_cdrom()
We first register cdrom and then we add_disk() and so we we should likewise unregister the cdrom first and then del_gendisk(). Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
4dfbd1390a
commit
2b6cabce39
@ -1021,9 +1021,9 @@ static void __exit pcd_exit(void)
|
||||
if (!cd->present)
|
||||
continue;
|
||||
|
||||
unregister_cdrom(&cd->info);
|
||||
del_gendisk(cd->disk);
|
||||
pi_release(cd->pi);
|
||||
unregister_cdrom(&cd->info);
|
||||
blk_cleanup_disk(cd->disk);
|
||||
|
||||
blk_mq_free_tag_set(&cd->tag_set);
|
||||
|
Loading…
Reference in New Issue
Block a user