|
|
Subscribe / Log in / New account

Re: [PATCH] check bh->b_blocknr only if BH_Mapped is set

From:  Andrew Morton <akpm-AT-linux-foundation.org>
To:  Nikanth Karthikesan <knikanth-AT-suse.de>
Subject:  Re: [PATCH] check bh->b_blocknr only if BH_Mapped is set
Date:  Tue, 10 Feb 2009 12:46:40 -0800
Message-ID:  <20090210124640.81d25a27.akpm@linux-foundation.org>
Cc:  linux-kernel-AT-vger.kernel.org, jens.axboe-AT-oracle.com
Archive‑link:  Article

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?

> 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?

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.

Thanks.



to post comments


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds