X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fpage-writeback.c;h=94c6d8988ab3239019ecc720b7ac0624e06016df;hb=ceb868796181dc95ea01a110e123afd391639873;hp=789b6adbef37f1f38c3887f10ba130595903408a;hpb=c2a3b233450d5bc426c063ea2d8a74351db29ea4;p=~andy%2Flinux diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 789b6adbef3..94c6d8988ab 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -126,8 +126,6 @@ static void background_writeout(unsigned long _min_pages); static struct prop_descriptor vm_completions; static struct prop_descriptor vm_dirties; -static unsigned long determine_dirtyable_memory(void); - /* * couple the period to the dirty_ratio: * @@ -347,7 +345,13 @@ static unsigned long highmem_dirtyable_memory(unsigned long total) #endif } -static unsigned long determine_dirtyable_memory(void) +/** + * determine_dirtyable_memory - amount of memory that may be used + * + * Returns the numebr of pages that can currently be freed and used + * by the kernel for direct mappings. + */ +unsigned long determine_dirtyable_memory(void) { unsigned long x; @@ -956,6 +960,9 @@ retry: } if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0)) mapping->writeback_index = index; + + if (wbc->range_cont) + wbc->range_start = index << PAGE_CACHE_SHIFT; return ret; } EXPORT_SYMBOL(write_cache_pages);