mm: fix atomic_t overflow in vm
[firefly-linux-kernel-4.4.55.git] / include / linux / mman.h
index 87920a0852a37e8945cdfd63bad2f6aa5f58110a..dab8892e6ff124817f7312b23e8055d3a50b2ce8 100644 (file)
 
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
-extern atomic_t vm_committed_space;
+extern atomic_long_t vm_committed_space;
 
 #ifdef CONFIG_SMP
 extern void vm_acct_memory(long pages);
 #else
 static inline void vm_acct_memory(long pages)
 {
-       atomic_add(pages, &vm_committed_space);
+       atomic_long_add(pages, &vm_committed_space);
 }
 #endif