* [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn()
@ 2011-08-06 14:32 Dan Carpenter
2011-08-08 21:07 ` Nicholas A. Bellinger
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-08-06 14:32 UTC (permalink / raw)
To: Nicholas A. Bellinger
Cc: Andy Grover, Roland Dreier, Christoph Hellwig,
open list:TARGET SUBSYSTEM, open list:TARGET SUBSYSTEM,
kernel-janitors
I was looking through the code for something unrelated and noticed
what looks like a forever loop here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
I am not familiar with the subsystem and haven't tested this, so
please review carefully.
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index 9806507..c4c68da 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -834,7 +834,7 @@ static int iscsit_attach_ooo_cmdsn(
*/
list_for_each_entry(ooo_tmp, &sess->sess_ooo_cmdsn_list,
ooo_list) {
- while (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
+ if (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
continue;
list_add(&ooo_cmdsn->ooo_list,
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn()
2011-08-06 14:32 [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn() Dan Carpenter
@ 2011-08-08 21:07 ` Nicholas A. Bellinger
0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2011-08-08 21:07 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andy Grover, Roland Dreier, Christoph Hellwig,
open list:TARGET SUBSYSTEM, open list:TARGET SUBSYSTEM,
kernel-janitors
On Sat, 2011-08-06 at 07:32 -0700, Dan Carpenter wrote:
> I was looking through the code for something unrelated and noticed
> what looks like a forever loop here.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> I am not familiar with the subsystem and haven't tested this, so
> please review carefully.
>
> diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
> index 9806507..c4c68da 100644
> --- a/drivers/target/iscsi/iscsi_target_erl1.c
> +++ b/drivers/target/iscsi/iscsi_target_erl1.c
> @@ -834,7 +834,7 @@ static int iscsit_attach_ooo_cmdsn(
> */
> list_for_each_entry(ooo_tmp, &sess->sess_ooo_cmdsn_list,
> ooo_list) {
> - while (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
> + if (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn)
> continue;
>
> list_add(&ooo_cmdsn->ooo_list,
> --
Mmmm, good catch. I think this bogus while loop usage is left over from
the pre sess->sess_ooo_cmd_list conversion, and it's definately not what
the original logic is doing.
Committed as e7851a0e73de into lio-core-2.6.git.
Thanks Dan!
--nab
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-08 21:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-06 14:32 [patch] iscsi-target: forever loop in iscsit_attach_ooo_cmdsn() Dan Carpenter
2011-08-08 21:07 ` Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox