]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
mm: get rid of pagevec_release_nonlru()
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tue, 6 Jan 2009 22:39:15 +0000 (14:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:00 +0000 (15:59 -0800)
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>
include/linux/pagevec.h
mm/swap.c

index e90a2cb0291530db1e80ad64bc553da45855d984..7b2886fa7fdc2885972d0ba2286afe59f0d1b82b 100644 (file)
@@ -21,7 +21,6 @@ struct pagevec {
 };
 
 void __pagevec_release(struct pagevec *pvec);
-void __pagevec_release_nonlru(struct pagevec *pvec);
 void __pagevec_free(struct pagevec *pvec);
 void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru);
 void pagevec_strip(struct pagevec *pvec);
@@ -69,12 +68,6 @@ static inline void pagevec_release(struct pagevec *pvec)
                __pagevec_release(pvec);
 }
 
-static inline void pagevec_release_nonlru(struct pagevec *pvec)
-{
-       if (pagevec_count(pvec))
-               __pagevec_release_nonlru(pvec);
-}
-
 static inline void pagevec_free(struct pagevec *pvec)
 {
        if (pagevec_count(pvec))
index b135ec90cdeb92673e2e97389f7cf9afc3ae80c9..21a566fc45701304b4d828a92f01380d74a7edae 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -397,28 +397,6 @@ void __pagevec_release(struct pagevec *pvec)
 
 EXPORT_SYMBOL(__pagevec_release);
 
-/*
- * pagevec_release() for pages which are known to not be on the LRU
- *
- * This function reinitialises the caller's pagevec.
- */
-void __pagevec_release_nonlru(struct pagevec *pvec)
-{
-       int i;
-       struct pagevec pages_to_free;
-
-       pagevec_init(&pages_to_free, pvec->cold);
-       for (i = 0; i < pagevec_count(pvec); i++) {
-               struct page *page = pvec->pages[i];
-
-               VM_BUG_ON(PageLRU(page));
-               if (put_page_testzero(page))
-                       pagevec_add(&pages_to_free, page);
-       }
-       pagevec_free(&pages_to_free);
-       pagevec_reinit(pvec);
-}
-
 /*
  * Add the passed pages to the LRU, then drop the caller's refcount
  * on them.  Reinitialises the caller's pagevec.