From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the mm-unstable tree
Date: Thu, 11 Sep 2025 16:05:10 +1000 [thread overview]
Message-ID: <20250911160510.07ba9ba1@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1975 bytes --]
Hi all,
After merging the mm-unstable tree, today's linux-next build (x86_64
allnoconfig) failed like this:
In file included from mm/shmem.c:44:
mm/swap.h: In function 'folio_index':
mm/swap.h:462:24: error: implicit declaration of function 'swp_offset'; did you mean 'pud_offset'? [-Wimplicit-function-declaration]
462 | return swp_offset(folio->swap);
| ^~~~~~~~~~
| pud_offset
In file included from mm/shmem.c:69:
include/linux/swapops.h: At top level:
include/linux/swapops.h:107:23: error: conflicting types for 'swp_offset'; have 'long unsigned int(swp_entry_t)'
107 | static inline pgoff_t swp_offset(swp_entry_t entry)
| ^~~~~~~~~~
mm/swap.h:462:24: note: previous implicit declaration of 'swp_offset' with type 'int()'
462 | return swp_offset(folio->swap);
| ^~~~~~~~~~
Caused by commit
c2079bb89a0c ("mm, swap: use the swap table for the swap cache and switch API")
but not fixed by commit
9b84186b7053 ("mm-swap-use-the-swap-table-for-the-swap-cache-and-switch-api-fix")
I applied this hack:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 11 Sep 2025 15:51:25 +1000
Subject: [PATCH] hack for "mm, swap: use the swap table for the swap cache and
switch API"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
mm/swap.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/swap.h b/mm/swap.h
index ad339547ee8c..8428026aa8d7 100644
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -458,8 +458,10 @@ static inline int non_swapcache_batch(swp_entry_t entry, int max_nr)
static inline pgoff_t folio_index(struct folio *folio)
{
#ifdef CONFIG_MMU
+#ifdef CONFIG_SWAP
if (unlikely(folio_test_swapcache(folio)))
return swp_offset(folio->swap);
+#endif
#endif
return folio->index;
}
--
2.51.0
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-09-11 6:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 6:05 Stephen Rothwell [this message]
2025-09-11 7:44 ` linux-next: build failure after merge of the mm-unstable tree Kairui Song
-- strict thread matches above, loose matches on Subject: below --
2026-01-07 0:16 Stephen Rothwell
2026-03-18 13:51 Mark Brown
2026-03-18 18:20 ` Andrew Morton
2026-03-18 19:08 ` Mark Brown
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=20250911160510.07ba9ba1@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.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