From: KOSAKI Motohiro Date: Tue, 22 Sep 2009 00:01:36 +0000 (-0700) Subject: mm: shrink_inactive_list() nr_scan accounting fix fix X-Git-Tag: v2.6.32-rc1~575 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b35ea17b7bbf5dea35faa0de11030acc620c3197;p=pandora-kernel.git mm: shrink_inactive_list() nr_scan accounting fix fix If sc->isolate_pages() return 0, we don't need to call shrink_page_list(). In past days, shrink_inactive_list() handled it properly. But commit fb8d14e1 (three years ago commit!) breaked it. current shrink_inactive_list() always call shrink_page_list() although isolate_pages() return 0. This patch restore proper return value check. Requirements: o "nr_taken == 0" condition should stay before calling shrink_page_list(). o "nr_taken == 0" condition should stay after nr_scan related statistics modification. Cc: Wu Fengguang Signed-off-by: KOSAKI Motohiro Reviewed-by: Rik van Riel Reviewed-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed