Skip to content

Commit 536f421

Browse files
RichardWeiYangtorvalds
authored andcommitted
mm: page->mapping folio->mapping should have the same offset
As with the other members of folio, the offset of page->mapping and folio->mapping must be the same. The compile-time check was inadvertently removed during development. Add it back. [[email protected]: changelog redo] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wei Yang <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 61e28cf commit 536f421

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/linux/mm_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ static_assert(sizeof(struct page) == sizeof(struct folio));
261261
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
262262
FOLIO_MATCH(flags, flags);
263263
FOLIO_MATCH(lru, lru);
264+
FOLIO_MATCH(mapping, mapping);
264265
FOLIO_MATCH(compound_head, lru);
265266
FOLIO_MATCH(index, index);
266267
FOLIO_MATCH(private, private);

0 commit comments

Comments
 (0)