aboutsummaryrefslogtreecommitdiff
path: root/mm/vmstat.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2018-03-26 02:32:53 +0000
committerAlex Shi <alex.shi@linaro.org>2018-03-26 02:32:53 +0000
commit38b587878eee8f9f2664135ab76805d0510bb997 (patch)
tree66f5c8eb8821dc7fa1fe91741b24ff7291ef3bf1 /mm/vmstat.c
parent323174b55ef1de0c70ed0b268fcaf9f2d6f842c6 (diff)
parent24f70aa804cd7f8fee4353cf4990997d1c8375ae (diff)
Merge tag 'v4.9.90' into linux-linaro-lsk-v4.9lsk-v4.9-18.03
This is the 4.9.90 stable release
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 3863b5d6d598..68b3193e4493 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1387,18 +1387,24 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
zone->present_pages,
zone->managed_pages);
- for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
- seq_printf(m, "\n %-12s %lu", vmstat_text[i],
- zone_page_state(zone, i));
-
seq_printf(m,
"\n protection: (%ld",
zone->lowmem_reserve[0]);
for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++)
seq_printf(m, ", %ld", zone->lowmem_reserve[i]);
- seq_printf(m,
- ")"
- "\n pagesets");
+ seq_putc(m, ')');
+
+ /* If unpopulated, no other information is useful */
+ if (!populated_zone(zone)) {
+ seq_putc(m, '\n');
+ return;
+ }
+
+ for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
+ seq_printf(m, "\n %-12s %lu", vmstat_text[i],
+ zone_page_state(zone, i));
+
+ seq_printf(m, "\n pagesets");
for_each_online_cpu(i) {
struct per_cpu_pageset *pageset;