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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 1d75d6ab6897..a60a3b3d8a7b 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -126,6 +126,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
126 unsigned long committed; 126 unsigned long committed;
127 unsigned long allowed; 127 unsigned long allowed;
128 struct vmalloc_info vmi; 128 struct vmalloc_info vmi;
129 long cached;
129 130
130 get_page_state(&ps); 131 get_page_state(&ps);
131 get_zone_counts(&active, &inactive, &free); 132 get_zone_counts(&active, &inactive, &free);
@@ -140,6 +141,10 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
140 allowed = ((totalram_pages - hugetlb_total_pages()) 141 allowed = ((totalram_pages - hugetlb_total_pages())
141 * sysctl_overcommit_ratio / 100) + total_swap_pages; 142 * sysctl_overcommit_ratio / 100) + total_swap_pages;
142 143
144 cached = get_page_cache_size() - total_swapcache_pages - i.bufferram;
145 if (cached < 0)
146 cached = 0;
147
143 get_vmalloc_info(&vmi); 148 get_vmalloc_info(&vmi);
144 149
145 /* 150 /*
@@ -172,7 +177,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
172 K(i.totalram), 177 K(i.totalram),
173 K(i.freeram), 178 K(i.freeram),
174 K(i.bufferram), 179 K(i.bufferram),
175 K(get_page_cache_size()-total_swapcache_pages-i.bufferram), 180 K(cached),
176 K(total_swapcache_pages), 181 K(total_swapcache_pages),
177 K(active), 182 K(active),
178 K(inactive), 183 K(inactive),