From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fengguang Wu Subject: Re: [patch 19/19] Use page_cache_xxx in drivers/block/rd.c Date: Thu, 29 Nov 2007 16:32:41 +0800 Message-ID: <396325170.21410@ustc.edu.cn> References: <20071129011052.866354847@sgi.com> <20071129011148.733429253@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Mel Gorman , William Lee Irwin III , David Chinner , Jens Axboe , Badari Pulavarty , Maxim Levitsky , Fengguang Wu , swin wang , totty.lu@gmail.com, hugh@veritas.com, joern@lazybastard.org To: Christoph Lameter Return-path: Received: from smtp.ustc.edu.cn ([202.38.64.16]:42680 "HELO ustc.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1752745AbXK2Icp (ORCPT ); Thu, 29 Nov 2007 03:32:45 -0500 Content-Disposition: inline In-Reply-To: <20071129011148.733429253@sgi.com> Message-Id: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Nov 28, 2007 at 05:11:11PM -0800, Christoph Lameter wrote: > Use page_cache_xxx in drivers/block/rd.c > > Signed-off-by: Christoph Lameter > --- > drivers/block/rd.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > Index: mm/drivers/block/rd.c > =================================================================== > --- mm.orig/drivers/block/rd.c 2007-11-28 12:19:49.673905513 -0800 > +++ mm/drivers/block/rd.c 2007-11-28 14:13:01.076977633 -0800 > @@ -122,7 +122,7 @@ static void make_page_uptodate(struct pa > } > } while ((bh = bh->b_this_page) != head); > } else { > - memset(page_address(page), 0, PAGE_CACHE_SIZE); > + memset(page_address(page), 0, page_cache_size(page_mapping(page))); > } > flush_dcache_page(page); > SetPageUptodate(page); > @@ -215,9 +215,9 @@ static const struct address_space_operat > static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector, > struct address_space *mapping) > { > - pgoff_t index = sector >> (PAGE_CACHE_SHIFT - 9); > + pgoff_t index = sector >> (page_cache_size(mapping) - 9); page_cache_shift Cheers, Fengguang