| From: Wei Yang <richard.weiyang@gmail.com> |
| Subject: 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. |
| |
| [willy@infradead.org: changelog redo] |
| Link: https://lkml.kernel.org/r/20220104011734.21714-1-richard.weiyang@gmail.com |
| Signed-off-by: Wei Yang <richard.weiyang@gmail.com> |
| Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| include/linux/mm_types.h | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- a/include/linux/mm_types.h~mm-page-mapping-folio-mapping-should-have-the-same-offset |
| +++ a/include/linux/mm_types.h |
| @@ -261,6 +261,7 @@ static_assert(sizeof(struct page) == siz |
| 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); |
| _ |