nvme: remove the GENHD_FL_UP check in nvme_ns_remove
Early probe failure never reaches nvme_ns_remove, so GENHD_FL_UP must be set at this point. Remove the check. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210809064028.1198327-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
a94dcfce70
commit
5eba200526
@ -3826,14 +3826,12 @@ static void nvme_ns_remove(struct nvme_ns *ns)
|
|||||||
nvme_mpath_clear_current_path(ns);
|
nvme_mpath_clear_current_path(ns);
|
||||||
synchronize_srcu(&ns->head->srcu); /* wait for concurrent submissions */
|
synchronize_srcu(&ns->head->srcu); /* wait for concurrent submissions */
|
||||||
|
|
||||||
if (ns->disk->flags & GENHD_FL_UP) {
|
if (!nvme_ns_head_multipath(ns->head))
|
||||||
if (!nvme_ns_head_multipath(ns->head))
|
nvme_cdev_del(&ns->cdev, &ns->cdev_device);
|
||||||
nvme_cdev_del(&ns->cdev, &ns->cdev_device);
|
del_gendisk(ns->disk);
|
||||||
del_gendisk(ns->disk);
|
blk_cleanup_queue(ns->queue);
|
||||||
blk_cleanup_queue(ns->queue);
|
if (blk_get_integrity(ns->disk))
|
||||||
if (blk_get_integrity(ns->disk))
|
blk_integrity_unregister(ns->disk);
|
||||||
blk_integrity_unregister(ns->disk);
|
|
||||||
}
|
|
||||||
|
|
||||||
down_write(&ns->ctrl->namespaces_rwsem);
|
down_write(&ns->ctrl->namespaces_rwsem);
|
||||||
list_del_init(&ns->list);
|
list_del_init(&ns->list);
|
||||||
|
Loading…
Reference in New Issue
Block a user