summaryrefslogtreecommitdiff
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-10-24 23:44:11 +0300
committerJakub Kicinski <kuba@kernel.org>2022-10-24 23:44:11 +0300
commit96917bb3a377e1ed103fd5c420a95e5fb25ca104 (patch)
tree59e0ef14e8707efba95d2f795742ba69a03bc8d0 /mm/huge_memory.c
parent86d6f77a3cce1189ab7c31e52e4d47ca58e7a601 (diff)
parent337a0a0b63f1c30195733eaacf39e4310a592a68 (diff)
downloadlinux-96917bb3a377e1ed103fd5c420a95e5fb25ca104.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/linux/net.h a5ef058dc4d9 ("net: introduce and use custom sockopt socket flag") e993ffe3da4b ("net: flag sockets supporting msghdr originated zerocopy") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1cc4a5f4791e..03fc7e5edf07 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2455,7 +2455,16 @@ static void __split_huge_page_tail(struct page *head, int tail,
page_tail);
page_tail->mapping = head->mapping;
page_tail->index = head->index + tail;
- page_tail->private = 0;
+
+ /*
+ * page->private should not be set in tail pages with the exception
+ * of swap cache pages that store the swp_entry_t in tail pages.
+ * Fix up and warn once if private is unexpectedly set.
+ */
+ if (!folio_test_swapcache(page_folio(head))) {
+ VM_WARN_ON_ONCE_PAGE(page_tail->private != 0, head);
+ page_tail->private = 0;
+ }
/* Page flags must be visible before we make the page non-compound. */
smp_wmb();