From: John Jolly <jjolly@suse.de>
Subject: Fix !CONFIG_SWAP build error with nr_swap_pages
Patch-mainline: Never, SUSE specific
References: bnc#882108
With !CONFIG_SWAP set, the build errors with nr_swap_pages undeclared.
The proper method of accessing nr_swap_pages is via the get_nr_swap_pages function
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7811,7 +7811,7 @@ unsigned long pagecache_over_limit()
unsigned long pgcache_lru_pages = global_page_state(NR_ACTIVE_FILE)
+ global_page_state(NR_INACTIVE_FILE);
unsigned long free_pages = global_page_state(NR_FREE_PAGES);
- unsigned long swap_pages = total_swap_pages - atomic_long_read(&nr_swap_pages);
+ unsigned long swap_pages = total_swap_pages - get_nr_swap_pages();
unsigned long limit;
if (vm_pagecache_ignore_dirty != 0)