Skip to content

Commit 8fb7b72

Browse files
haokexinSteve French
authored andcommitted
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>
1 parent 8cf9bed commit 8fb7b72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/smb/server/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ int ksmbd_conn_handler_loop(void *p)
284284
goto out;
285285

286286
conn->last_active = jiffies;
287+
set_freezable();
287288
while (ksmbd_conn_alive(conn)) {
288289
if (try_to_freeze())
289290
continue;

0 commit comments

Comments
 (0)