Skip to content
Commit a861790a authored by ZouMingzhe's avatar ZouMingzhe Committed by Martin K. Petersen
Browse files

scsi: target: iscsi: Make sure the np under each tpg is unique

iscsit_tpg_check_network_portal() has nested for_each loops and is supposed
to return true when a match is found. However, the tpg loop will still
continue after existing the tpg_np loop. If this tpg_np is not the last the
match value will be changed.

Break the outer loop after finding a match and make sure the np under each
tpg is unique.

Link: https://lore.kernel.org/r/20220111054742.19582-1-mingzhe.zou@easystack.cn


Signed-off-by: default avatarZouMingzhe <mingzhe.zou@easystack.cn>
Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 61263b3a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment