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

From: Stephen Rothwell
Date: Fri Dec 17 2021 - 02:13:31 EST


Hi all,

After merging the userns tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/lockd/svc.c: In function 'lockd':
fs/lockd/svc.c:188:2: error: implicit declaration of function 'module_put_and_exit'; did you mean 'module_put_and_kthread_exit'? [-Werror=implicit-function-declaration]
188 | module_put_and_exit(0);
| ^~~~~~~~~~~~~~~~~~~
| module_put_and_kthread_exit
fs/lockd/svc.c:189:1: error: no return statement in function returning non-void [-Werror=return-type]
189 | }
| ^

Caused by commit

ca3574bd653a ("exit: Rename module_put_and_exit to module_put_and_kthread_exit")

interacting with commit

6b044fbaab02 ("lockd: use svc_set_num_threads() for thread start and stop")

from the cel tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 17 Dec 2021 18:10:42 +1100
Subject: [PATCH] fix up for "lockd: use svc_set_num_threads() for thread start
and stop"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
fs/lockd/svc.c | 2 +-
include/linux/sunrpc/svc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 4defefd89cbf..0475c5a5d061 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -185,7 +185,7 @@ lockd(void *vrqstp)

svc_exit_thread(rqstp);

- module_put_and_exit(0);
+ module_put_and_kthread_exit(0);
}

static int create_lockd_listener(struct svc_serv *serv, const char *name,
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index cf175d47c6b7..f35c22b3355f 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -65,7 +65,7 @@ struct svc_serv_ops {
void (*svo_enqueue_xprt)(struct svc_xprt *);

/* optional module to count when adding threads.
- * Thread function must call module_put_and_exit() to exit.
+ * Thread function must call module_put_and_kthread_exit() to exit.
*/
struct module *svo_module;
};
--
2.33.0

--
Cheers,
Stephen Rothwell

Attachment: pgp5GPnUkRIqK.pgp
Description: OpenPGP digital signature