diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index cf55945c83fb91d18bdaef4f0d893d6a94fa9034..712e8c37a200b243b2fff14c379c8acc621a662f 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page) return lru; } +#define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) + #endif diff --git a/mm/internal.h b/mm/internal.h index 016452d2fede4623bb9a7be2361de199e8588ada..38e24b89e4c400394212941a1789dd75bb902198 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -119,8 +119,6 @@ extern int isolate_lru_page(struct page *page); extern void putback_lru_page(struct page *page); extern bool zone_reclaimable(struct zone *zone); -#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru)) - /* * in mm/rmap.c: */ diff --git a/mm/readahead.c b/mm/readahead.c index 0aff760b09d4a93bf8d6f292de434e4d574fce79..20e58e820e444d630b2ab807a369c53679eaa7ba 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "internal.h"