From 8fb7b723924cc9306bc161f45496497aec733904 Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Sun, 17 Dec 2023 21:41:37 +0800 Subject: ksmbd: Add missing set_freezable() for freezable kthread The kernel thread function ksmbd_conn_handler_loop() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Acked-by: Namjae Jeon Signed-off-by: Steve French --- fs/smb/server/connection.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/smb/server') diff --git a/fs/smb/server/connection.c b/fs/smb/server/connection.c index b6fa1e285c40..d311c2ee10bd 100644 --- a/fs/smb/server/connection.c +++ b/fs/smb/server/connection.c @@ -284,6 +284,7 @@ int ksmbd_conn_handler_loop(void *p) goto out; conn->last_active = jiffies; + set_freezable(); while (ksmbd_conn_alive(conn)) { if (try_to_freeze()) continue; -- cgit v1.2.3