Multiple filesystems open code lru_to_page(). Rectify this by moving the macro from mm_inline (which is specific to lru stuff) to the more generic mm.h header and start using the macro where appropriate. No functional changes.
Showing the changes to include/linux (2 of 10 files). Show all
Unified · Split
| @@ -171,6 +171,8 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *, · 170 unmodified lines | ||
| 171 | 171 | /* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */ |
| 172 | 172 | #define PAGE_ALIGNED(addr) IS_ALIGNED((unsigned long)(addr), PAGE_SIZE) |
| 173 | 173 | |
| 174 | +#define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) | |
| 175 | + | |
| 174 | 176 | /* |
| 175 | 177 | * Linux kernel virtual memory manager primitives. |
| 176 | 178 | * The idea being to have a "virtual" mm in the same way |
| @@ -124,7 +124,4 @@ static __always_inline enum lru_list page_lru(struct page *page) · 123 unmodified lines | ||
| 124 | 124 | } |
| 125 | 125 | return lru; |
| 126 | 126 | } |
| 127 | − | |
| 128 | −#define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) | |
| 129 | − | |
| 130 | 127 | #endif |