aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index bc7d9abca743..1af12fd77fe6 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -142,7 +142,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
142 allowed = ((totalram_pages - hugetlb_total_pages()) 142 allowed = ((totalram_pages - hugetlb_total_pages())
143 * sysctl_overcommit_ratio / 100) + total_swap_pages; 143 * sysctl_overcommit_ratio / 100) + total_swap_pages;
144 144
145 cached = get_page_cache_size() - total_swapcache_pages - i.bufferram; 145 cached = global_page_state(NR_FILE_PAGES) -
146 total_swapcache_pages - i.bufferram;
146 if (cached < 0) 147 if (cached < 0)
147 cached = 0; 148 cached = 0;
148 149