Commit 76e7211c authored by Kevin Hao's avatar Kevin Hao Committed by Andreas Gruenbacher

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: default avatarKevin Hao <haokexin@gmail.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent ff7a85af
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment