[resend][PATCH] fix lru_cache_add_active_or_unevictable

From: KOSAKI Motohiro
Date: Wed Jul 02 2008 - 09:21:36 EST


I found I forgot insert below patch to my patchset for 2.6.26-rc5-mm3 today.
So, I resend it.

enjoy!


-------------------------
From: Rik van Riel <riel@xxxxxxxxxx>

Undo an overzealous code cleanup to lru_cache_add_active_or_unevictable.
The callers do not set PageActive so the page would get added to the
wrong list.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>

Index: linux-2.6.26-rc5-mm3/mm/swap.c
===================================================================
--- linux-2.6.26-rc5-mm3.orig/mm/swap.c 2008-07-01 18:47:04.000000000 +0900
+++ linux-2.6.26-rc5-mm3/mm/swap.c 2008-07-01 19:28:43.000000000 +0900
@@ -259,7 +259,7 @@
struct vm_area_struct *vma)
{
if (page_evictable(page, vma))
- lru_cache_add_lru(page, page_lru(page));
+ lru_cache_add_lru(page, LRU_ACTIVE + page_is_file_cache(page));
else
add_page_to_unevictable_list(page);
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/