aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-12-18 13:35:57 +0800
committerAndreas Gruenbacher <agruenba@redhat.com>2023-12-21 22:53:35 +0100
commit76e7211ca129f6a9117ae88c020a4c1cafaa24cc (patch)
tree58bad29eb58e5f6361a5d459a38eb7d1e26bff6c /fs/gfs2
parentff7a85af5a5bdda04756a8cdbdc0dd9a7a8ea468 (diff)
downloadlinux-76e7211ca129f6a9117ae88c020a4c1cafaa24cc.tar.gz
gfs2: Add missing set_freezable() for freezable kthread
The kernel thread function gfs2_logd() and gfs2_quotad() invoke the try_to_freeze() in its loop. But all the kernel threads are no-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> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/log.c1
-rw-r--r--fs/gfs2/quota.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index fdef6bc77c5419..860176989751e5 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -1303,6 +1303,7 @@ int gfs2_logd(void *data)
struct gfs2_sbd *sdp = data;
unsigned long t = 1;
+ set_freezable();
while (!kthread_should_stop()) {
if (gfs2_withdrawing_or_withdrawn(sdp))
break;
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 9ade69f8d33842..1da9a600db7e94 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1583,6 +1583,7 @@ int gfs2_quotad(void *data)
unsigned long quotad_timeo = 0;
unsigned long t = 0;
+ set_freezable();
while (!kthread_should_stop()) {
if (gfs2_withdrawing_or_withdrawn(sdp))
break;