Skip to content

Commit

Permalink
staging: lowmemorykiller: Fix enum conversion warning
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance authored and AkiraNoSushi committed Oct 12, 2021
1 parent 085155d commit a19735e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,
if (pressure >= 95) {
other_file = global_node_page_state(NR_FILE_PAGES) -
global_node_page_state(NR_SHMEM) -
global_page_state(NR_UNEVICTABLE) -
global_node_page_state(NR_UNEVICTABLE) -
total_swapcache_pages();
other_free = global_page_state(NR_FREE_PAGES);

Expand All @@ -325,7 +325,7 @@ static int lmk_vmpressure_notifier(struct notifier_block *nb,

other_file = global_node_page_state(NR_FILE_PAGES) -
global_node_page_state(NR_SHMEM) -
global_page_state(NR_UNEVICTABLE) -
global_node_page_state(NR_UNEVICTABLE) -
total_swapcache_pages();

other_free = global_page_state(NR_FREE_PAGES);
Expand Down Expand Up @@ -645,7 +645,7 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
#else
other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages;

if (global_page_state(NR_SHMEM) + global_page_state(NR_UNEVICTABLE) + total_swapcache_pages() <
if (global_node_page_state(NR_SHMEM) + global_node_page_state(NR_UNEVICTABLE) + total_swapcache_pages() <
global_node_page_state(NR_UNEVICTABLE) <
global_node_page_state(NR_FILE_PAGES))
other_file = global_node_page_state(NR_FILE_PAGES) -
Expand Down

0 comments on commit a19735e

Please sign in to comment.