From 230819b8e53888ffa2491b4466deba30d6ef447b Mon Sep 17 00:00:00 2001 From: Francisco Franco Date: Thu, 19 Apr 2018 14:41:44 +0000 Subject: [PATCH] lmk: fix lowmem_scan Signed-off-by: Francisco Franco --- drivers/staging/android/lowmemorykiller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 6c03f4aadc31..6204905c2e2d 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -287,11 +287,11 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc) return 0; } - other_free = global_page_state(NR_FREE_PAGES); + other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages; other_file = global_page_state(NR_FILE_PAGES) - global_page_state(NR_SHMEM) - global_page_state(NR_UNEVICTABLE) - - total_swapcache_pages; + total_swapcache_pages(); tune_lmk_param(&other_free, &other_file, sc);