From: Nikanth Karthikesan <knikanth@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, jens.axboe@oracle.com, stack.box@gmail.com
Subject: Re: [PATCH] check bh->b_blocknr only if BH_Mapped is set
Date: Wed, 11 Feb 2009 11:31:00 +0530 [thread overview]
Message-ID: <200902111131.00539.knikanth@suse.de> (raw)
In-Reply-To: <20090210124640.81d25a27.akpm@linux-foundation.org>
On Wednesday 11 February 2009 02:16:40 Andrew Morton wrote:
> On Mon, 9 Feb 2009 17:48:11 +0530
>
> Nikanth Karthikesan <knikanth@suse.de> wrote:
> > check bh->b_blocknr only if BH_Mapped is set
>
> Why?
>
b_blocknr will have a valid blocknr only when BH_Mapped is set.
> > 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);
>
> Does this fix some user-visible misbehaviour? If so, what was that
> behaviour?
>
No. I was looking at the "Bug 12593 - __find_get_block_slow while using
parted." Even though this may not be the cause of that bug, I think this could
be a potential problem elsewhere.
> Please write good changelogs. This is not some pointless book-keeping
> exercise. People will make decisions about which kernel versions
> patches should be merged into, and they will want to know if a
> particular patch addresses a particular problem which they are
> experiencing. For this, they need information.
>
Sorry for the bad changelog. Thanks for pointing it out.
Thanks
Nikanth
prev parent reply other threads:[~2009-02-11 6:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 12:18 [PATCH] check bh->b_blocknr only if BH_Mapped is set Nikanth Karthikesan
2009-02-10 20:46 ` Andrew Morton
2009-02-11 6:01 ` Nikanth Karthikesan [this message]
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=200902111131.00539.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stack.box@gmail.com \
/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