From: Nick Piggin Date: Tue, 5 May 2009 09:13:44 +0000 (+1000) Subject: mm: SLUB fix reclaim_state X-Git-Tag: v2.6.29.5~71 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7b30cf45c0eaad6a87cf387a39a3638ebbced0fb;p=karo-tx-linux.git mm: SLUB fix reclaim_state commit 1eb5ac6466d4be7b15b38ce3ab709600f1bc891f upstream. SLUB does not correctly account reclaim_state.reclaimed_slab, so it will break memory reclaim. Account it like SLAB does. Cc: linux-mm@kvack.org Cc: Matt Mackall Acked-by: Christoph Lameter Signed-off-by: Nick Piggin Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/slub.c b/mm/slub.c index 0280eee6cf37..5663da0eb342 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -9,6 +9,7 @@ */ #include +#include /* struct reclaim_state */ #include #include #include @@ -1175,6 +1176,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page) __ClearPageSlab(page); reset_page_mapcount(page); + if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += pages; __free_pages(page, order); }