mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xavier Bestel <xavier.bestel@free.fr>
To: Jens Axboe <axboe@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] bug waiting to happen in rq_for_each_bio
Date: Thu, 15 Jan 2004 22:52:17 +0100	[thread overview]
Message-ID: <1074203537.20197.77.camel@bip.parateam.prv> (raw)

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;



             reply	other threads:[~2004-01-15 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15 21:52 Xavier Bestel [this message]
2004-01-16  8:20 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1074203537.20197.77.camel@bip.parateam.prv \
    --to=xavier.bestel@free.fr \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®