ksmbd: Add missing set_freezable() for freezable kthread
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- fs/smb/server/connection.c | 1 + 1 file changed, 1 insertion(+)
fs/smb/server/connection.c +1 -0
@@ -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 ;
Signature · 1 line
2.39.2
2023-12-17 22:41 GMT+09:00, Kevin Hao <[email protected]>:
Quoted 6 lines
The kernel thread function
ksmbd_conn_handler_loop()invokes thetry_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 invokeset_freezable()explicitly.Signed-off-by Kevin Hao <[email protected]>
Acked-by Namjae Jeon <[email protected]>
Sorry for late response. Applied it to #ksmbd-for-next-next. Thanks for your patch!