summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKiryl Shutsemau <kas@kernel.org>2026-02-27 19:42:40 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-04-05 13:53:07 -0700
commitf0369fb13619569ba8564ce8d4fc9d385bbee8a2 (patch)
tree0d71e1801bf3a52cee4dda72411bded59b084fa1 /include
parenta2c77ec320a99581e8272868ccfa53a7d7a7b168 (diff)
downloadlinux-f0369fb13619569ba8564ce8d4fc9d385bbee8a2.tar.gz
linux-f0369fb13619569ba8564ce8d4fc9d385bbee8a2.zip
mm: change the interface of prep_compound_tail()
Instead of passing down the head page and tail page index, pass the tail and head pages directly, as well as the order of the compound page. This is a preparation for changing how the head position is encoded in the tail page. Link: https://lkml.kernel.org/r/20260227194302.274384-3-kas@kernel.org Signed-off-by: Kiryl Shutsemau <kas@kernel.org> Reviewed-by: Muchun Song <muchun.song@linux.dev> Reviewed-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand (arm) <david@kernel.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Baoquan He <bhe@redhat.com> Cc: Christoph Lameter <cl@gentwo.org> Cc: David Rientjes <rientjes@google.com> Cc: Frank van der Linden <fvdl@google.com> Cc: Harry Yoo <harry.yoo@oracle.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Oscar Salvador <osalvador@suse.de> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Usama Arif <usamaarif642@gmail.com> Cc: WANG Xuerui <kernel@xen0n.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/page-flags.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 415e9f2ef616..7729a4a28b44 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -870,9 +870,10 @@ static inline bool folio_test_large(const struct folio *folio)
return folio_test_head(folio);
}
-static __always_inline void set_compound_head(struct page *page, struct page *head)
+static __always_inline void set_compound_head(struct page *tail,
+ const struct page *head, unsigned int order)
{
- WRITE_ONCE(page->compound_head, (unsigned long)head + 1);
+ WRITE_ONCE(tail->compound_head, (unsigned long)head + 1);
}
static __always_inline void clear_compound_head(struct page *page)