aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-01-06 17:39:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:00 -0500
commit1b0bd118862cd9fe9ac2872137a1b8107e83ff9d (patch)
tree2bd59ee95762164d4e98bbafd251e3abd31c2af1
parent5594c8c813d9e907ff55da7080d42653478b73e8 (diff)
mm: get rid of pagevec_release_nonlru()
speculative page references patch (commit: e286781d5f2e9c846e012a39653a166e9d31777d) removed last pagevec_release_nonlru() caller. So this function can be removed now. This patch doesn't have any functional change. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/pagevec.h7
-rw-r--r--mm/swap.c22
2 files changed, 0 insertions, 29 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index e90a2cb02915..7b2886fa7fdc 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -21,7 +21,6 @@ struct pagevec {
21}; 21};
22 22
23void __pagevec_release(struct pagevec *pvec); 23void __pagevec_release(struct pagevec *pvec);
24void __pagevec_release_nonlru(struct pagevec *pvec);
25void __pagevec_free(struct pagevec *pvec); 24void __pagevec_free(struct pagevec *pvec);
26void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); 25void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru);
27void pagevec_strip(struct pagevec *pvec); 26void pagevec_strip(struct pagevec *pvec);
@@ -69,12 +68,6 @@ static inline void pagevec_release(struct pagevec *pvec)
69 __pagevec_release(pvec); 68 __pagevec_release(pvec);
70} 69}
71 70
72static inline void pagevec_release_nonlru(struct pagevec *pvec)
73{
74 if (pagevec_count(pvec))
75 __pagevec_release_nonlru(pvec);
76}
77
78static inline void pagevec_free(struct pagevec *pvec) 71static inline void pagevec_free(struct pagevec *pvec)
79{ 72{
80 if (pagevec_count(pvec)) 73 if (pagevec_count(pvec))
diff --git a/mm/swap.c b/mm/swap.c
index b135ec90cdeb..21a566fc4570 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -398,28 +398,6 @@ void __pagevec_release(struct pagevec *pvec)
398EXPORT_SYMBOL(__pagevec_release); 398EXPORT_SYMBOL(__pagevec_release);
399 399
400/* 400/*
401 * pagevec_release() for pages which are known to not be on the LRU
402 *
403 * This function reinitialises the caller's pagevec.
404 */
405void __pagevec_release_nonlru(struct pagevec *pvec)
406{
407 int i;
408 struct pagevec pages_to_free;
409
410 pagevec_init(&pages_to_free, pvec->cold);
411 for (i = 0; i < pagevec_count(pvec); i++) {
412 struct page *page = pvec->pages[i];
413
414 VM_BUG_ON(PageLRU(page));
415 if (put_page_testzero(page))
416 pagevec_add(&pages_to_free, page);
417 }
418 pagevec_free(&pages_to_free);
419 pagevec_reinit(pvec);
420}
421
422/*
423 * Add the passed pages to the LRU, then drop the caller's refcount 401 * Add the passed pages to the LRU, then drop the caller's refcount
424 * on them. Reinitialises the caller's pagevec. 402 * on them. Reinitialises the caller's pagevec.
425 */ 403 */