Commit d72ee911 authored by Geliang Tang's avatar Geliang Tang Committed by Linus Torvalds

mm: move lru_to_page to mm_inline.h

Move lru_to_page() from internal.h to mm_inline.h.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0bc126d4
...@@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page) ...@@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page)
return lru; return lru;
} }
#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
#endif #endif
...@@ -119,8 +119,6 @@ extern int isolate_lru_page(struct page *page); ...@@ -119,8 +119,6 @@ extern int isolate_lru_page(struct page *page);
extern void putback_lru_page(struct page *page); extern void putback_lru_page(struct page *page);
extern bool zone_reclaimable(struct zone *zone); extern bool zone_reclaimable(struct zone *zone);
#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
/* /*
* in mm/rmap.c: * in mm/rmap.c:
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/mm_inline.h>
#include "internal.h" #include "internal.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment