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 <[email protected]> Reviewed-by: Israel Rukshin <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Max Gurtovoy <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent b86d659 commit 5e4b55f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)