nilfs2: Add missing set_freezable() for freezable kthread
PATCH 1/1 nilfs2: Add missing set_freezable() for freezable kthread
The kernel thread function nilfs_segctor_thread() 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/nilfs2/segment.c | 1 + 1 file changed, 1 insertion(+)
fs/nilfs2/segment.c +1 -0
@@ -2588,6 +2588,7 @@ static int nilfs_segctor_thread(void *arg)"segctord starting. Construction interval = %lu seconds, CP frequency < %lu seconds" , sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ); +set_freezable ();spin_lock (&sci->sc_state_lock); loop:for (;;) {
Signature · 1 line
2.39.2
Ryusuke Konishi
maintainerQuoted 10 lines · Kevin Hao
The kernel thread function
nilfs_segctor_thread()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]>--- fs/nilfs2/segment.c | 1 + 1 file changed, 1 insertion(+)
Thank you!
I'll grab this and send it upstream.
Ryusuke Konishi
Quoted 16 lines
fs/nilfs2/segment.c +1
-1@@ -2588,6 +2588,7 @@ static int nilfs_segctor_thread(void *arg)"segctord starting. Construction interval = %lu seconds, CP frequency < %lu seconds" , sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ); +set_freezable ();spin_lock (&sci->sc_state_lock); loop:for (;;) { --2.39.2