From: Christoph Hellwig hch@lst.de
mainline inclusion from mainline-v5.15 commit 9da4c7276ec5d167972d8f6670d64b59838b4ed2 category: bugfix bugzilla: 181328 CVE: NA
-----------------------------------------------
There is no need to explicitly unregister the integrity profile when deleting the gendisk.
Signed-off-by: Christoph Hellwig hch@lst.de Reviewed-by: Sagi Grimberg sagi@grimberg.me Link: https://lore.kernel.org/r/20210914070657.87677-4-hch@lst.de Signed-off-by: Jens Axboe axboe@kernel.dk
Conflict: drivers/nvme/host/core.c Signed-off-by: Yu Kuai yukuai3@huawei.com Reviewed-by: Hou Tao houtao1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/nvme/host/core.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 7982818763835..522ab9c0133ca 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3370,8 +3370,6 @@ static void nvme_ns_remove(struct nvme_ns *ns) if (ns->disk && ns->disk->flags & GENHD_FL_UP) { del_gendisk(ns->disk); blk_cleanup_queue(ns->queue); - if (blk_get_integrity(ns->disk)) - blk_integrity_unregister(ns->disk); }
down_write(&ns->ctrl->namespaces_rwsem);