]> git.baikalelectronics.ru Git - kernel.git/commit
mm: account skipped entries to avoid looping in find_get_pages
authorShaohua Li <shaohua.li@intel.com>
Thu, 15 Sep 2011 00:45:19 +0000 (08:45 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Sep 2011 01:17:56 +0000 (18:17 -0700)
commit9048ad80bd61b79c412c8dc6c2ac9a5980f24316
tree5c8c8b127e8bd31300fba1f5aa155c6463c4c78f
parent121f9241c8213554f33458f346d02387a8e40b82
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>
mm/filemap.c