diff options
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -528,7 +528,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) | |||
528 | 528 | ||
529 | if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { | 529 | if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { |
530 | free = global_page_state(NR_FREE_PAGES); | 530 | free = global_page_state(NR_FREE_PAGES); |
531 | free += global_page_state(NR_FILE_PAGES); | 531 | free += global_node_page_state(NR_FILE_PAGES); |
532 | 532 | ||
533 | /* | 533 | /* |
534 | * shmem pages shouldn't be counted as free in this | 534 | * shmem pages shouldn't be counted as free in this |
@@ -536,7 +536,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) | |||
536 | * that won't affect the overall amount of available | 536 | * that won't affect the overall amount of available |
537 | * memory in the system. | 537 | * memory in the system. |
538 | */ | 538 | */ |
539 | free -= global_page_state(NR_SHMEM); | 539 | free -= global_node_page_state(NR_SHMEM); |
540 | 540 | ||
541 | free += get_nr_swap_pages(); | 541 | free += get_nr_swap_pages(); |
542 | 542 | ||