Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756862Ab0G2KrJ (ORCPT ); Thu, 29 Jul 2010 06:47:09 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:57002 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756819Ab0G2KrH (ORCPT ); Thu, 29 Jul 2010 06:47:07 -0400 Message-ID: <4C515C34.9090005@cn.fujitsu.com> Date: Thu, 29 Jul 2010 18:47:16 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Yan, Zheng" CC: Chris Mason , Linux Btrfs , Linux Kernel Subject: Re: [PATCH 7/7] btrfs: fix a wrong error check in add_ra_bio_pages() References: <4C513C95.3080403@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1471 Lines: 45 On Thu, 29 Jul 2010 18:38:39 +0800, Yan, Zheng wrote: > 2010/7/29 Miao Xie: >> From: Liu Bo >> >> Only when a page is not found by page_index, we'll go to the error check. >> >> Signed-off-by: Liu Bo >> Signed-off-by: Miao Xie >> --- >> fs/btrfs/compression.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c >> index cb3877c..8458840 100644 >> --- a/fs/btrfs/compression.c >> +++ b/fs/btrfs/compression.c >> @@ -467,7 +467,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, >> rcu_read_lock(); >> page = radix_tree_lookup(&mapping->page_tree, page_index); >> rcu_read_unlock(); >> - if (page) { >> + if (!page) { >> check_misses: >> misses++; >> if (misses> 4) > > This patch is wrong. The word "miss" here means "miss for read-ahead because > the page is already in the page cache" Oh, my mistake. Sorry! Please ignore this patch. Thanks for your review! How about the others? Miao > > Yan, Zheng > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/