Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Shaohua Li <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information