From: Nikanth Karthikesan <knikanth@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <jens.axboe@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] check bh->b_blocknr only if BH_Mapped is set
Date: Mon, 9 Feb 2009 17:48:11 +0530 [thread overview]
Message-ID: <200902091748.12545.knikanth@suse.de> (raw)
check bh->b_blocknr only if BH_Mapped is set
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
---
diff --git a/fs/buffer.c b/fs/buffer.c
index 665d446..782c365 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -344,13 +344,13 @@ __find_get_block_slow(struct block_device *bdev,
sector_t block)
head = page_buffers(page);
bh = head;
do {
- if (bh->b_blocknr == block) {
+ if (!buffer_mapped(bh))
+ all_mapped = 0;
+ else if (bh->b_blocknr == block) {
ret = bh;
get_bh(bh);
goto out_unlock;
}
- if (!buffer_mapped(bh))
- all_mapped = 0;
bh = bh->b_this_page;
} while (bh != head);
next reply other threads:[~2009-02-09 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 12:18 Nikanth Karthikesan [this message]
2009-02-10 20:46 ` [PATCH] check bh->b_blocknr only if BH_Mapped is set Andrew Morton
2009-02-11 6:01 ` Nikanth Karthikesan
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=200902091748.12545.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--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