CHROMIUM: mm: vmscan: Fix redundant scan loop when file page count is low

a. In get_scan_count(), When inactive file > active file, kswapd only
scan file pages.
b. In shrink_list(), if file page kbytes < min_filelist_kbytes, scanning
file would return immediately.

When a. b. conditions are both met, kswapd keeps scanning file pages
without reclaiming memory.

This patch moves the file_is_low() shortcut from shrink_list() to
get_scan_count() to avoid the logic conflict between shrink_list() and
get_scan_count().

BUG=chromium:718046
TEST=adjusting min_filelist_kbytes when kswapd is running, see bug for
detailed repro steps

Change-Id: Iff1cda53df1c214a3caf25884d9b372c4af62c01
Signed-off-by: Vovo Yang <vovoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/487686
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
(cherry picked from commit b6a402d4a990584d4e9b4da1520dec6307d8c7e9)
Reviewed-on: https://chromium-review.googlesource.com/544737
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
1 file changed