Messages in this thread | | | Date | Fri, 16 Jan 2004 09:20:38 +0100 | From | Jens Axboe <> | Subject | Re: [PATCH] bug waiting to happen in rq_for_each_bio |
| |
On Thu, Jan 15 2004, Xavier Bestel wrote: > 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;
Yep, should be added. Thanks.
-- Jens Axboe
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |