]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/android/lowmemorykiller.c
Merge tag 'usb-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[karo-tx-linux.git] / drivers / staging / android / lowmemorykiller.c
index 4bcf00a872705927d8228ac33af82d06d19e6ec0..b545d3d1da3e5f6ccbd59f783e55ce30ff23479d 100644 (file)
@@ -88,7 +88,8 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
        int array_size = ARRAY_SIZE(lowmem_adj);
        int other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages;
        int other_file = global_page_state(NR_FILE_PAGES) -
-                                               global_page_state(NR_SHMEM);
+                                               global_page_state(NR_SHMEM) -
+                                               total_swapcache_pages();
 
        if (lowmem_adj_size < array_size)
                array_size = lowmem_adj_size;