Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Link: https://lkml.kernel.org/r/20231219090918.2329-1-konishi.ryusuke@gmail.com
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kevin Hao and committed by
Andrew Morton
5b130948 d3916156

+1
+1
fs/nilfs2/segment.c
··· 2588 2588 "segctord starting. Construction interval = %lu seconds, CP frequency < %lu seconds", 2589 2589 sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ); 2590 2590 2591 + set_freezable(); 2591 2592 spin_lock(&sci->sc_state_lock); 2592 2593 loop: 2593 2594 for (;;) {