diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-15 21:19:14 +0200 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-07-15 21:19:14 +0200 |
commit | 0c17e4ceedd35c78b1c7413dbd16279a350be6bc (patch) | |
tree | 313b3b9ca04727f3704464e01d8dd97da1dd534b /mm/page-writeback.c | |
parent | [ARM] S3C24XX: Fix SERIAL_SAMSUNG entry (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pen... (diff) | |
download | linux-0c17e4ceedd35c78b1c7413dbd16279a350be6bc.tar.xz linux-0c17e4ceedd35c78b1c7413dbd16279a350be6bc.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-rmk
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 789b6adbef37..94c6d8988ab3 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); |