commit | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 | [log] [tgz] |
---|---|---|
author | Shaohua Li <shaohua.li@intel.com> | Thu Sep 15 08:45:19 2011 +0800 |
committer | Linus Torvalds <torvalds@linux-foundation.org> | Wed Sep 14 18:17:56 2011 -0700 |
tree | 5c8c8b127e8bd31300fba1f5aa155c6463c4c78f | |
parent | 4f5b04800a224aadb6cffcbbc3d3fa26e2367c7f [diff] |
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 <eric.dumazet@gmail.com> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>