public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bug waiting to happen in rq_for_each_bio
@ 2004-01-15 21:52 Xavier Bestel
  2004-01-16  8:20 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Xavier Bestel @ 2004-01-15 21:52 UTC (permalink / raw)
  To: Jens Axboe, Linux Kernel Mailing List

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;



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

end of thread, other threads:[~2004-01-16  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-15 21:52 [PATCH] bug waiting to happen in rq_for_each_bio Xavier Bestel
2004-01-16  8:20 ` Jens Axboe

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