public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] aoe: error printed 1 too early
@ 2009-02-25 13:38 Roel Kluin
  2009-02-25 17:09 ` Ed Cashin
  2009-03-04  8:08 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Roel Kluin @ 2009-02-25 13:38 UTC (permalink / raw)
  To: ecashin; +Cc: lkml, Andrew Morton

with while (i-- > 0); i reaches -1 after the loop, so the test below is printed
one too early: 0 still means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index cc25057..eeea477 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -173,7 +173,7 @@ skbfree(struct sk_buff *skb)
 		return;
 	while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0)
 		msleep(Sms);
-	if (i <= 0) {
+	if (i < 0) {
 		printk(KERN_ERR
 			"aoe: %s holds ref: %s\n",
 			skb->dev ? skb->dev->name : "netif",

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-04  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 13:38 [PATCH] aoe: error printed 1 too early Roel Kluin
2009-02-25 17:09 ` Ed Cashin
2009-02-25 22:01   ` David Miller
2009-02-25 22:19     ` Ed Cashin
2009-02-25 22:29     ` roel kluin
2009-03-04  8:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox