mm: page->mapping folio->mapping should have the same offset
PATCH 1/1 mm: page->mapping folio->mapping should have the same offset
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 <[email protected]>
---
BYW, I am not sure why we compare ->compound_head and ->lru?
--- include/linux/mm_types.h | 1 + 1 file changed, 1 insertion(+)
include/linux/mm_types.h +1 -0
@@ -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);
Signature · 1 line
2.33.1