mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
61e28cf054
commit
536f4217ce
@ -261,6 +261,7 @@ static_assert(sizeof(struct page) == sizeof(struct folio));
|
|||||||
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
|
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
|
||||||
FOLIO_MATCH(flags, flags);
|
FOLIO_MATCH(flags, flags);
|
||||||
FOLIO_MATCH(lru, lru);
|
FOLIO_MATCH(lru, lru);
|
||||||
|
FOLIO_MATCH(mapping, mapping);
|
||||||
FOLIO_MATCH(compound_head, lru);
|
FOLIO_MATCH(compound_head, lru);
|
||||||
FOLIO_MATCH(index, index);
|
FOLIO_MATCH(index, index);
|
||||||
FOLIO_MATCH(private, private);
|
FOLIO_MATCH(private, private);
|
||||||
|
Loading…
Reference in New Issue
Block a user