aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/nommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 4d1b8a199867..1a19fb3b0463 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1928,7 +1928,7 @@ EXPORT_SYMBOL(unmap_mapping_range);
1928 */ 1928 */
1929int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) 1929int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
1930{ 1930{
1931 unsigned long free, allowed, reserve; 1931 long free, allowed, reserve;
1932 1932
1933 vm_acct_memory(pages); 1933 vm_acct_memory(pages);
1934 1934
@@ -1992,7 +1992,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
1992 */ 1992 */
1993 if (mm) { 1993 if (mm) {
1994 reserve = sysctl_user_reserve_kbytes >> (PAGE_SHIFT - 10); 1994 reserve = sysctl_user_reserve_kbytes >> (PAGE_SHIFT - 10);
1995 allowed -= min(mm->total_vm / 32, reserve); 1995 allowed -= min_t(long, mm->total_vm / 32, reserve);
1996 } 1996 }
1997 1997
1998 if (percpu_counter_read_positive(&vm_committed_as) < allowed) 1998 if (percpu_counter_read_positive(&vm_committed_as) < allowed)