Message ID | 20220111054742.19582-1-mingzhe.zou@easystack.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | a861790afaa8b6369eee8a88c5d5d73f5799c0c6 |
Headers | show |
Series | target: make sure the np under each tpg is unique | expand |
> 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. Applied to 5.17/scsi-staging, thanks!
On Tue, 11 Jan 2022 13:47:42 +0800, mingzhe.zou@easystack.cn wrote: > From: ZouMingzhe <mingzhe.zou@easystack.cn> > > 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. > > [...] Applied to 5.17/scsi-fixes, thanks! [1/1] target: make sure the np under each tpg is unique https://git.kernel.org/mkp/scsi/c/a861790afaa8
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( break; } spin_unlock(&tpg->tpg_np_lock); + + if (match) + break; } spin_unlock(&tiqn->tiqn_tpg_lock);