From: Max Gurtovoy Date: Fri, 12 May 2023 15:41:54 +0000 (+0300) Subject: nvme-fabrics: check hostid using uuid_equal X-Git-Tag: v6.5-rc1~114^2~33^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e4b55fa522ec0839f33a73fe5facf609ee66b58;p=thirdparty%2Flinux.git 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 --- 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;