Skip to content
Snippets Groups Projects
Commit a280c9ce authored by Kevin Hao's avatar Kevin Hao Committed by Dave Kleikamp
Browse files

jfs: Add missing set_freezable() for freezable kthread


The kernel thread function jfs_lazycommit() and jfs_sync() 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 avatarDave Kleikamp <dave.kleikamp@oracle.com>
parent 49f9637a
No related branches found
No related tags found
No related merge requests found
...@@ -2702,6 +2702,7 @@ int jfs_lazycommit(void *arg) ...@@ -2702,6 +2702,7 @@ int jfs_lazycommit(void *arg)
unsigned long flags; unsigned long flags;
struct jfs_sb_info *sbi; struct jfs_sb_info *sbi;
set_freezable();
do { do {
LAZY_LOCK(flags); LAZY_LOCK(flags);
jfs_commit_thread_waking = 0; /* OK to wake another thread */ jfs_commit_thread_waking = 0; /* OK to wake another thread */
...@@ -2884,6 +2885,7 @@ int jfs_sync(void *arg) ...@@ -2884,6 +2885,7 @@ int jfs_sync(void *arg)
struct jfs_inode_info *jfs_ip; struct jfs_inode_info *jfs_ip;
tid_t tid; tid_t tid;
set_freezable();
do { do {
/* /*
* write each inode on the anonymous inode list * write each inode on the anonymous inode list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment