Commit 414c62e2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Keith Busch

nvme: move blk_integrity_unregister into nvme_init_integrity

Move uneregistering the existing integrity profile into the helper
dealing with all the other integrity / metadata setup.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent f467b48e
...@@ -1727,6 +1727,8 @@ static bool nvme_init_integrity(struct gendisk *disk, struct nvme_ns_head *head) ...@@ -1727,6 +1727,8 @@ static bool nvme_init_integrity(struct gendisk *disk, struct nvme_ns_head *head)
{ {
struct blk_integrity integrity = { }; struct blk_integrity integrity = { };
blk_integrity_unregister(disk);
if (!head->ms) if (!head->ms)
return true; return true;
...@@ -1980,8 +1982,6 @@ static void nvme_update_disk_info(struct nvme_ctrl *ctrl, struct gendisk *disk, ...@@ -1980,8 +1982,6 @@ static void nvme_update_disk_info(struct nvme_ctrl *ctrl, struct gendisk *disk,
bs = (1 << 9); bs = (1 << 9);
} }
blk_integrity_unregister(disk);
atomic_bs = phys_bs = bs; atomic_bs = phys_bs = bs;
if (id->nabo == 0) { if (id->nabo == 0) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment