From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: [patch 03/19] Use page_cache_xxx in mm/page-writeback.c Date: Fri, 30 Nov 2007 09:34:51 -0800 Message-ID: <20071130173506.829378577@sgi.com> References: <20071130173448.951783014@sgi.com> Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: akpm@linux-foundation.org Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:58275 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757778AbXK3RfK (ORCPT ); Fri, 30 Nov 2007 12:35:10 -0500 Cc: Christoph Hellwig , Mel Gorman Cc: William Lee Irwin III , David Chinner Cc: Jens Axboe , Badari Pulavarty Cc: Maxim Levitsky , Fengguang Wu Cc: swin wang , totty.lu@gmail.com, hugh@veritas.com Cc: joern@lazybastard.org Content-Disposition: inline; filename=0004-Use-page_cache_xxx-in-mm-page-writeback.c.patch Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Use page_cache_xxx in mm/page-writeback.c Reviewed-by: Dave Chinner Signed-off-by: Christoph Lameter --- mm/page-writeback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: mm/mm/page-writeback.c =================================================================== --- mm.orig/mm/page-writeback.c 2007-11-28 12:27:32.211962401 -0800 +++ mm/mm/page-writeback.c 2007-11-28 14:10:34.338227137 -0800 @@ -818,8 +818,8 @@ int write_cache_pages(struct address_spa index = mapping->writeback_index; /* Start from prev offset */ end = -1; } else { - index = wbc->range_start >> PAGE_CACHE_SHIFT; - end = wbc->range_end >> PAGE_CACHE_SHIFT; + index = page_cache_index(mapping, wbc->range_start); + end = page_cache_index(mapping, wbc->range_end); if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX) range_whole = 1; scanned = 1; @@ -1025,7 +1025,7 @@ int __set_page_dirty_nobuffers(struct pa __inc_zone_page_state(page, NR_FILE_DIRTY); __inc_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE); - task_io_account_write(PAGE_CACHE_SIZE); + task_io_account_write(page_cache_size(mapping)); } radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); --