All of
 help / color / mirror / Atom feed
	ZouMingzhe <>
Subject: [PATCH] target: make sure the np under each tpg is unique
Date: Tue, 11 Jan 2022 13:47:42 +0800	[thread overview]
Message-ID: <> (raw)

From: ZouMingzhe <>

iscsit_tpg_check_network_portal() has two-layer for loop, and
should return true When a match is found. Then, the tpg loop
will still continue after break the tpg_np loop. If this tpg_np
is not the last, the match value will be changed.

This patch break all loops after finding a match, and make sure
the np under each tpg is unique.

Signed-off-by: ZouMingzhe <>
 drivers/target/iscsi/iscsi_target_tpg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c
index 8075f60fd02c..2d5cf1714ae0 100644
--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -443,6 +443,9 @@ static bool iscsit_tpg_check_network_portal(
+		if (match)
+			break;

             reply	other threads:[~2022-01-11  5:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  5:47 mingzhe.zou [this message]
2022-01-19  3:32 ` Martin K. Petersen
2022-01-25  5:40 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2022-01-11  5:45 mingzhe.zou
2022-01-13  1:20 ` Mike Christie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH] target: make sure the np under each tpg is unique' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.