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

Message ID 20240207171741.1f3f090f@canb.auug.org.au
State New
Headers
Series linux-next: build failure after merge of the mm tree |

Commit Message

Stephen Rothwell Feb. 7, 2024, 6:17 a.m. UTC
  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@canb.auug.org.au>
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@canb.auug.org.au>
---
 include/linux/swap.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

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)
 {
 }