Commit f1821d88 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.8pre2

parent ef01a983
......@@ -214,7 +214,7 @@ extern atomic_t too_many_dirty_buffers;
int shrink_mmap(int priority, int gfp_mask)
{
static unsigned long clock = 0;
unsigned long limit = num_physpages;
unsigned long limit = num_physpages << 1;
struct page * page;
int count, users;
......@@ -245,6 +245,8 @@ int shrink_mmap(int priority, int gfp_mask)
if ((gfp_mask & __GFP_DMA) && !PageDMA(page))
continue;
count--;
/*
* Some common cases that we just short-circuit without
* getting the locks - we need to re-check this once we
......@@ -290,7 +292,6 @@ int shrink_mmap(int priority, int gfp_mask)
/* Is it a buffer page? */
if (page->buffers) {
spin_unlock(&pagecache_lock);
count--;
if (try_to_free_buffers(page))
goto made_progress;
spin_lock(&pagecache_lock);
......@@ -300,8 +301,6 @@ int shrink_mmap(int priority, int gfp_mask)
if (page_count(page) != 2)
goto spin_unlock_continue;
count--;
/*
* Is it a page swap page? If so, we want to
* drop it if it is no longer used, even if it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment