diff options
author | Christoph Hellwig <[email protected]> | 2024-03-04 07:04:50 -0700 |
---|---|---|
committer | Keith Busch <[email protected]> | 2024-03-04 08:24:56 -0800 |
commit | 414c62e2ce5d93bfbdc12048530075dcea02cad8 (patch) | |
tree | 974dcab996aa438ccacd4695cd9a1d2cafa3a4f1 | |
parent | f467b48e38a60c64d73619145247c550d8edf82f (diff) |
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 <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
-rw-r--r-- | drivers/nvme/host/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 1ecddb6f5ad9..40fab7c47eae 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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; @@ -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) { /* |