mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm: page->mapping folio->mapping should have the same offset
@ 2022-01-04  1:17 Wei Yang
  0 siblings, 0 replies; only message in thread
From: Wei Yang @ 2022-01-04  1:17 UTC (permalink / raw)
  To: peterz, willy, vbabka, akpm, dhowells, will, linyunsheng,
	feng.tang, ebiederm, aarcange
  Cc: linux-kernel, Wei Yang

In commit 7b230db3b8d3 ("mm: Introduce struct folio"), folio is
introduced. This is a folio of page, so we need to make sure those
members of folio should be at the same offset in page.

The offset of mapping is not checked. This patch just add it.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>

---
BYW, I am not sure why we compare ->compound_head and ->lru?
---
 include/linux/mm_types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index c3a6e6209600..0a2de709fe40 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -288,6 +288,7 @@ static_assert(sizeof(struct page) == sizeof(struct folio));
 	static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
 FOLIO_MATCH(flags, flags);
 FOLIO_MATCH(lru, lru);
+FOLIO_MATCH(mapping, mapping);
 FOLIO_MATCH(compound_head, lru);
 FOLIO_MATCH(index, index);
 FOLIO_MATCH(private, private);
-- 
2.33.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-04  1:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04  1:17 [PATCH] mm: page->mapping folio->mapping should have the same offset Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®