[PATCH 08/21] nvme: move blk_integrity_unregister into nvme_init_integrity
Max Gurtovoy
mgurtovoy at nvidia.com
Thu Feb 29 04:36:39 PST 2024
On 28/02/2024 20:12, Christoph Hellwig wrote:
> Move uneregistering the existing integrity profile into the helper
> dealing with all the other integrity / metadata setup.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> drivers/nvme/host/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 76e548902ec33e..105046a7957272 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) {
> /*
Looks good,
Reviewed-by: Max Gurtovoy <mgurtovoy at nvidia.com>
More information about the Linux-nvme
mailing list