summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2022-01-29 13:41:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-30 09:56:58 +0200
commit536f4217ced62b671bd759f6b549621a5654a70f (patch)
treea2c5daf27c3fe8c0d674518556c99bc7465fc07e
parent61e28cf0543c7d8e6ef88c3c305f727c5a21ba5b (diff)
downloadlwn-536f4217ced62b671bd759f6b549621a5654a70f.tar.gz
lwn-536f4217ced62b671bd759f6b549621a5654a70f.zip
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>
-rw-r--r--include/linux/mm_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 9db36dc5d4cf..5140e5feb486 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -261,6 +261,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);