summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/swap.h5
-rw-r--r--mm/vmscan.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c38bd157695..c0d23ac710d 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -371,6 +371,11 @@ static inline struct page *lookup_swap_cache(swp_entry_t swp)
return NULL;
}
+static inline int add_to_swap(struct page *page)
+{
+ return 0;
+}
+
static inline int add_to_swap_cache(struct page *page, swp_entry_t entry,
gfp_t gfp_mask)
{
diff --git a/mm/vmscan.c b/mm/vmscan.c
index cc7401571cb..f350523a8ee 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -617,7 +617,6 @@ static unsigned long shrink_page_list(struct list_head *page_list,
referenced && page_mapping_inuse(page))
goto activate_locked;
-#ifdef CONFIG_SWAP
/*
* Anonymous process memory has backing store?
* Try to allocate it some swap space here.
@@ -629,7 +628,6 @@ static unsigned long shrink_page_list(struct list_head *page_list,
goto activate_locked;
may_enter_fs = 1;
}
-#endif /* CONFIG_SWAP */
mapping = page_mapping(page);