From mboxrd@z Thu Jan 1 00:00:00 1970 From: clameter@sgi.com Subject: [04/37] Use page_cache_xxx in mm/page-writeback.c Date: Wed, 20 Jun 2007 11:29:11 -0700 Message-ID: <20070620183006.655335860@sgi.com> References: <20070620182907.506775016@sgi.com> Cc: Christoph Hellwig , Mel Gorman To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:46729 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755451AbXFTSaJ (ORCPT ); Wed, 20 Jun 2007 14:30:09 -0400 Cc: William Lee Irwin III , David Chinner Cc: Jens Axboe , Badari Pulavarty Cc: Maxim Levitsky Content-Disposition: inline; filename=vps_mm_page_writeback Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Signed-off-by: Christoph Lameter --- mm/page-writeback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: vps/mm/page-writeback.c =================================================================== --- vps.orig/mm/page-writeback.c 2007-06-07 17:01:04.000000000 -0700 +++ vps/mm/page-writeback.c 2007-06-09 21:34:24.000000000 -0700 @@ -626,8 +626,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; @@ -829,7 +829,7 @@ int __set_page_dirty_nobuffers(struct pa WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); if (mapping_cap_account_dirty(mapping)) { __inc_zone_page_state(page, NR_FILE_DIRTY); - 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); --