summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/swap_state.c2
-rw-r--r--mm/vmstat.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 4e166f1c692c..61039e39e25f 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -96,6 +96,7 @@ int __add_to_swap_cache(struct page *page, swp_entry_t entry)
if (likely(!error)) {
address_space->nrpages++;
__inc_zone_page_state(page, NR_FILE_PAGES);
+ __inc_zone_page_state(page, NR_SWAPCACHE);
INC_CACHE_INFO(add_total);
}
spin_unlock_irq(&address_space->tree_lock);
@@ -148,6 +149,7 @@ void __delete_from_swap_cache(struct page *page)
ClearPageSwapCache(page);
address_space->nrpages--;
__dec_zone_page_state(page, NR_FILE_PAGES);
+ __dec_zone_page_state(page, NR_SWAPCACHE);
INC_CACHE_INFO(del_total);
}
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 4923dfe89983..c0e67319d3e8 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -763,6 +763,7 @@ const char * const vmstat_text[] = {
"workingset_nodereclaim",
"nr_anon_transparent_hugepages",
"nr_free_cma",
+ "nr_swapcache",
/* enum writeback_stat_item counters */
"nr_dirty_threshold",