[PATCH] bug waiting to happen in rq_for_each_bio

From: Xavier Bestel
Date: Thu Jan 15 2004 - 16:54:22 EST


This bug would have been caught at compile time anyway, unless somebody
uses a weird name for bio.

--- ./include/linux/blkdev.h.orig 2004-01-15 22:43:29.000000000 +0100
+++ ./include/linux/blkdev.h 2004-01-15 22:44:23.000000000 +0100
@@ -493,9 +493,9 @@
}
#endif /* CONFIG_MMU */

-#define rq_for_each_bio(bio, rq) \
+#define rq_for_each_bio(_bio, rq) \
if ((rq->bio)) \
- for (bio = (rq)->bio; bio; bio = bio->bi_next)
+ for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)

struct sec_size {
unsigned block_size;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/