From 5e4b55fa522ec0839f33a73fe5facf609ee66b58 Mon Sep 17 00:00:00 2001 From: Max Gurtovoy Date: Fri, 12 May 2023 18:41:54 +0300 Subject: [PATCH] nvme-fabrics: check hostid using uuid_equal Use a dedicated function to match uuids instead of duplicating it. Tested-by: Noam Gottlieb Reviewed-by: Israel Rukshin Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Max Gurtovoy Signed-off-by: Keith Busch --- drivers/nvme/host/fabrics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h index b78dc3b985081..82e7a27ffbde3 100644 --- a/drivers/nvme/host/fabrics.h +++ b/drivers/nvme/host/fabrics.h @@ -181,7 +181,7 @@ nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl, ctrl->state == NVME_CTRL_DEAD || strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) || strcmp(opts->host->nqn, ctrl->opts->host->nqn) || - memcmp(&opts->host->id, &ctrl->opts->host->id, sizeof(uuid_t))) + !uuid_equal(&opts->host->id, &ctrl->opts->host->id)) return false; return true; -- 2.30.2