Skip to content

Commit 5e4b55f

Browse files
mgurtovoykeithbusch
authored andcommitted
nvme-fabrics: check hostid using uuid_equal
Use a dedicated function to match uuids instead of duplicating it. Tested-by: Noam Gottlieb <ngottlieb@nvidia.com> Reviewed-by: Israel Rukshin <israelr@nvidia.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent b86d659 commit 5e4b55f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nvme/host/fabrics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl,
181181
ctrl->state == NVME_CTRL_DEAD ||
182182
strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) ||
183183
strcmp(opts->host->nqn, ctrl->opts->host->nqn) ||
184-
memcmp(&opts->host->id, &ctrl->opts->host->id, sizeof(uuid_t)))
184+
!uuid_equal(&opts->host->id, &ctrl->opts->host->id))
185185
return false;
186186

187187
return true;

0 commit comments

Comments
 (0)