Skip to content

Commit da066ad

Browse files
koct9itorvalds
authored andcommitted
mm: remove unused pagevec_free
It not exported and now nobody uses it. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cc59850 commit da066ad

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎include/linux/pagevec.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct pagevec {
2121
};
2222

2323
void __pagevec_release(struct pagevec *pvec);
24-
void __pagevec_free(struct pagevec *pvec);
2524
void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru);
2625
void pagevec_strip(struct pagevec *pvec);
2726
unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping,
@@ -67,12 +66,6 @@ static inline void pagevec_release(struct pagevec *pvec)
6766
__pagevec_release(pvec);
6867
}
6968

70-
static inline void pagevec_free(struct pagevec *pvec)
71-
{
72-
if (pagevec_count(pvec))
73-
__pagevec_free(pvec);
74-
}
75-
7669
static inline void __pagevec_lru_add_anon(struct pagevec *pvec)
7770
{
7871
____pagevec_lru_add(pvec, LRU_INACTIVE_ANON);

‎mm/page_alloc.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,16 +2319,6 @@ unsigned long get_zeroed_page(gfp_t gfp_mask)
23192319
}
23202320
EXPORT_SYMBOL(get_zeroed_page);
23212321

2322-
void __pagevec_free(struct pagevec *pvec)
2323-
{
2324-
int i = pagevec_count(pvec);
2325-
2326-
while (--i >= 0) {
2327-
trace_mm_pagevec_free(pvec->pages[i], pvec->cold);
2328-
free_hot_cold_page(pvec->pages[i], pvec->cold);
2329-
}
2330-
}
2331-
23322322
void __free_pages(struct page *page, unsigned int order)
23332323
{
23342324
if (put_page_testzero(page)) {

0 commit comments

Comments
 (0)