Skip to content

Commit

Permalink
mm: move lru_to_page to mm_inline.h
Browse files Browse the repository at this point in the history
Move lru_to_page() from internal.h to mm_inline.h.

Signed-off-by: Geliang Tang <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
geliangtang authored and torvalds committed Jan 15, 2016
1 parent 0bc126d commit d72ee91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/linux/mm_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*/
Expand Down
1 change: 1 addition & 0 deletions mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/pagemap.h>
#include <linux/syscalls.h>
#include <linux/file.h>
#include <linux/mm_inline.h>

#include "internal.h"

Expand Down

0 comments on commit d72ee91

Please sign in to comment.