diff options
-rw-r--r-- | include/linux/swap.h | 2 | ||||
-rw-r--r-- | mm/swap_state.c | 4 | ||||
-rw-r--r-- | mm/vmscan.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index c3ecd478840e..c38bd157695b 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -278,7 +278,7 @@ extern void end_swap_bio_read(struct bio *bio, int err); | |||
278 | extern struct address_space swapper_space; | 278 | extern struct address_space swapper_space; |
279 | #define total_swapcache_pages swapper_space.nrpages | 279 | #define total_swapcache_pages swapper_space.nrpages |
280 | extern void show_swap_cache_info(void); | 280 | extern void show_swap_cache_info(void); |
281 | extern int add_to_swap(struct page *, gfp_t); | 281 | extern int add_to_swap(struct page *); |
282 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); | 282 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); |
283 | extern void __delete_from_swap_cache(struct page *); | 283 | extern void __delete_from_swap_cache(struct page *); |
284 | extern void delete_from_swap_cache(struct page *); | 284 | extern void delete_from_swap_cache(struct page *); |
diff --git a/mm/swap_state.c b/mm/swap_state.c index bcb472769299..81c825f67a7f 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
@@ -128,7 +128,7 @@ void __delete_from_swap_cache(struct page *page) | |||
128 | * Allocate swap space for the page and add the page to the | 128 | * Allocate swap space for the page and add the page to the |
129 | * swap cache. Caller needs to hold the page lock. | 129 | * swap cache. Caller needs to hold the page lock. |
130 | */ | 130 | */ |
131 | int add_to_swap(struct page * page, gfp_t gfp_mask) | 131 | int add_to_swap(struct page *page) |
132 | { | 132 | { |
133 | swp_entry_t entry; | 133 | swp_entry_t entry; |
134 | int err; | 134 | int err; |
@@ -153,7 +153,7 @@ int add_to_swap(struct page * page, gfp_t gfp_mask) | |||
153 | * Add it to the swap cache and mark it dirty | 153 | * Add it to the swap cache and mark it dirty |
154 | */ | 154 | */ |
155 | err = add_to_swap_cache(page, entry, | 155 | err = add_to_swap_cache(page, entry, |
156 | gfp_mask|__GFP_NOMEMALLOC|__GFP_NOWARN); | 156 | __GFP_HIGH|__GFP_NOMEMALLOC|__GFP_NOWARN); |
157 | 157 | ||
158 | switch (err) { | 158 | switch (err) { |
159 | case 0: /* Success */ | 159 | case 0: /* Success */ |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 74f875733e2b..cc7401571cba 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -625,7 +625,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
625 | if (PageAnon(page) && !PageSwapCache(page)) { | 625 | if (PageAnon(page) && !PageSwapCache(page)) { |
626 | if (!(sc->gfp_mask & __GFP_IO)) | 626 | if (!(sc->gfp_mask & __GFP_IO)) |
627 | goto keep_locked; | 627 | goto keep_locked; |
628 | if (!add_to_swap(page, GFP_ATOMIC)) | 628 | if (!add_to_swap(page)) |
629 | goto activate_locked; | 629 | goto activate_locked; |
630 | may_enter_fs = 1; | 630 | may_enter_fs = 1; |
631 | } | 631 | } |