Commit 6c5703d5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rq_for_each_bio fix

From: Xavier Bestel <xavier.bestel@free.fr>

Within the body of this macro we are accessing rq->bio, but `bio' is an arg
to the macro.  If someone uses this macro with some variable which is not
named `bio' it won't compile.

So use a more-likely-to-be-unique identifier for the macro.
parent 489a867c
...@@ -483,9 +483,9 @@ static inline void blk_queue_bounce(request_queue_t *q, struct bio **bio) ...@@ -483,9 +483,9 @@ static inline void blk_queue_bounce(request_queue_t *q, struct bio **bio)
} }
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
#define rq_for_each_bio(bio, rq) \ #define rq_for_each_bio(_bio, rq) \
if ((rq->bio)) \ if ((rq->bio)) \
for (bio = (rq)->bio; bio; bio = bio->bi_next) for (_bio = (rq)->bio; _bio; _bio = bio->bi_next)
struct sec_size { struct sec_size {
unsigned block_size; unsigned block_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment