diff options
Diffstat (limited to 'mm/internal.h')
| -rw-r--r-- | mm/internal.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/internal.h b/mm/internal.h index 2daa6a744172..9cfbd8e41914 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -897,13 +897,12 @@ static inline void prep_compound_head(struct page *page, unsigned int order) INIT_LIST_HEAD(&folio->_deferred_list); } -static inline void prep_compound_tail(struct page *head, int tail_idx) +static inline void prep_compound_tail(struct page *tail, + const struct page *head, unsigned int order) { - struct page *p = head + tail_idx; - - p->mapping = TAIL_MAPPING; - set_compound_head(p, head); - set_page_private(p, 0); + tail->mapping = TAIL_MAPPING; + set_compound_head(tail, head, order); + set_page_private(tail, 0); } void post_alloc_hook(struct page *page, unsigned int order, gfp_t gfp_flags); |
