mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
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>
This commit is contained in:
parent
ff7a85af5a
commit
76e7211ca1
2 changed files with 2 additions and 0 deletions
|
@ -1303,6 +1303,7 @@ int gfs2_logd(void *data)
|
||||||
struct gfs2_sbd *sdp = data;
|
struct gfs2_sbd *sdp = data;
|
||||||
unsigned long t = 1;
|
unsigned long t = 1;
|
||||||
|
|
||||||
|
set_freezable();
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
if (gfs2_withdrawing_or_withdrawn(sdp))
|
if (gfs2_withdrawing_or_withdrawn(sdp))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1583,6 +1583,7 @@ int gfs2_quotad(void *data)
|
||||||
unsigned long quotad_timeo = 0;
|
unsigned long quotad_timeo = 0;
|
||||||
unsigned long t = 0;
|
unsigned long t = 0;
|
||||||
|
|
||||||
|
set_freezable();
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
if (gfs2_withdrawing_or_withdrawn(sdp))
|
if (gfs2_withdrawing_or_withdrawn(sdp))
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue