From: Wei Yang <richard.weiyang@gmail.com>
To: peterz@infradead.org, willy@infradead.org, vbabka@suse.cz,
akpm@linux-foundation.org, dhowells@redhat.com, will@kernel.org,
linyunsheng@huawei.com, feng.tang@intel.com,
ebiederm@xmission.com, aarcange@redhat.com
Cc: linux-kernel@vger.kernel.org, Wei Yang <richard.weiyang@gmail.com>
Subject: [PATCH] mm: page->mapping folio->mapping should have the same offset
Date: Tue, 4 Jan 2022 01:17:34 +0000 [thread overview]
Message-ID: <20220104011734.21714-1-richard.weiyang@gmail.com> (raw)
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 <richard.weiyang@gmail.com>
---
BYW, I am not sure why we compare ->compound_head and ->lru?
---
include/linux/mm_types.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index c3a6e6209600..0a2de709fe40 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -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);
--
2.33.1
reply other threads:[~2022-01-04 1:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104011734.21714-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=feng.tang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=peterz@infradead.org \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®