diff options
-rw-r--r-- | mm/swap_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c index 0df9a57b1de8..fc2aecb70a95 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/buffer_head.h> | 15 | #include <linux/buffer_head.h> |
16 | #include <linux/backing-dev.h> | 16 | #include <linux/backing-dev.h> |
17 | #include <linux/pagevec.h> | ||
17 | 18 | ||
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
19 | 20 | ||
@@ -272,12 +273,11 @@ void free_page_and_swap_cache(struct page *page) | |||
272 | */ | 273 | */ |
273 | void free_pages_and_swap_cache(struct page **pages, int nr) | 274 | void free_pages_and_swap_cache(struct page **pages, int nr) |
274 | { | 275 | { |
275 | int chunk = 16; | ||
276 | struct page **pagep = pages; | 276 | struct page **pagep = pages; |
277 | 277 | ||
278 | lru_add_drain(); | 278 | lru_add_drain(); |
279 | while (nr) { | 279 | while (nr) { |
280 | int todo = min(chunk, nr); | 280 | int todo = min(nr, PAGEVEC_SIZE); |
281 | int i; | 281 | int i; |
282 | 282 | ||
283 | for (i = 0; i < todo; i++) | 283 | for (i = 0; i < todo; i++) |