Skip to content

Commit 414c62e

Browse files
Christoph Hellwigkeithbusch
authored andcommitted
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent f467b48 commit 414c62e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,8 @@ static bool nvme_init_integrity(struct gendisk *disk, struct nvme_ns_head *head)
17271727
{
17281728
struct blk_integrity integrity = { };
17291729

1730+
blk_integrity_unregister(disk);
1731+
17301732
if (!head->ms)
17311733
return true;
17321734

@@ -1980,8 +1982,6 @@ static void nvme_update_disk_info(struct nvme_ctrl *ctrl, struct gendisk *disk,
19801982
bs = (1 << 9);
19811983
}
19821984

1983-
blk_integrity_unregister(disk);
1984-
19851985
atomic_bs = phys_bs = bs;
19861986
if (id->nabo == 0) {
19871987
/*

0 commit comments

Comments
 (0)