mm: fix atomic_t overflow in vm
[firefly-linux-kernel-4.4.55.git] / fs / proc / proc_misc.c
index 74a323d2b850884f06c2206fc4d288e957c8bef6..32dc14cd890058dcdd1424a3c1d8ff5c3134c28e 100644 (file)
@@ -139,7 +139,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
 #define K(x) ((x) << (PAGE_SHIFT - 10))
        si_meminfo(&i);
        si_swapinfo(&i);
-       committed = atomic_read(&vm_committed_space);
+       committed = atomic_long_read(&vm_committed_space);
        allowed = ((totalram_pages - hugetlb_total_pages())
                * sysctl_overcommit_ratio / 100) + total_swap_pages;