linux-next: build failure after merge of the mm tree

From: Stephen Rothwell
Date: Wed Feb 07 2024 - 01:17:54 EST


Hi all,

After merging the mm tree, today's linux-next build (x86_64 allnodconfig)
failed like this:

mm/memory.c: In function 'do_swap_page':
mm/memory.c:4004:29: error: implicit declaration of function 'swapcache_prepare'; did you mean 'swapcache_clear'? [-Werror=implicit-function-declaration]
4004 | if (swapcache_prepare(entry))
| ^~~~~~~~~~~~~~~~~
| swapcache_clear

Caused by commit

1fa5b77af107 ("mm/swap: fix race condition in direct swapin path")

from the mm-unstable branch of the mm tree.

# CONFIG_SWAP is not set

I have applied the following patch for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 7 Feb 2024 17:04:15 +1100
Subject: [PATCH] fix up for "mm/swap: fix race condition in direct swapin
path"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/swap.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 768a9078070d..b4c389b9e4e0 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -552,6 +552,11 @@ static inline int swap_duplicate(swp_entry_t swp)
return 0;
}

+static inline int swapcache_prepare(swp_entry_t swp)
+{
+ return 0;
+}
+
static inline void swap_free(swp_entry_t swp)
{
}
--
2.43.0

--
Cheers,
Stephen Rothwell

Attachment: pgps9dgLEZuGN.pgp
Description: OpenPGP digital signature