aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smb
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-12-17 21:41:37 +0800
committerSteve French <stfrench@microsoft.com>2024-01-09 20:01:16 -0600
commit8fb7b723924cc9306bc161f45496497aec733904 (patch)
treec10f92b6fda0abadf47dc973188f9736515fdc71 /fs/smb
parent8cf9bedfc3c47d24bb0de386f808f925dc52863e (diff)
downloadlinux-8fb7b723924cc9306bc161f45496497aec733904.tar.gz
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 <haokexin@gmail.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb')
-rw-r--r--fs/smb/server/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/server/connection.c b/fs/smb/server/connection.c
index b6fa1e285c401..d311c2ee10bd7 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;