From: Shaohua Li Date: Thu, 15 Sep 2011 00:45:19 +0000 (+0800) Subject: mm: account skipped entries to avoid looping in find_get_pages X-Git-Tag: v3.1-rc7~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941;p=pandora-kernel.git mm: account skipped entries to avoid looping in find_get_pages The found entries by find_get_pages() could be all swap entries. In this case we skip the entries, but make sure the skipped entries are accounted, so we don't keep looping. Using nr_found > nr_skip to simplify code as suggested by Eric. Reported-and-tested-by: Eric Dumazet Signed-off-by: Shaohua Li Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed