Skip to content

Commit

Permalink
nvme: move blk_integrity_unregister into nvme_init_integrity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Keith Busch committed Mar 4, 2024
1 parent f467b48 commit 414c62e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,8 @@ static bool nvme_init_integrity(struct gendisk *disk, struct nvme_ns_head *head)
{
struct blk_integrity integrity = { };

blk_integrity_unregister(disk);

if (!head->ms)
return true;

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

blk_integrity_unregister(disk);

atomic_bs = phys_bs = bs;
if (id->nabo == 0) {
/*
Expand Down

0 comments on commit 414c62e

Please sign in to comment.