summaryrefslogtreecommitdiff
path: root/fs/jfs
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-12-18 13:23:23 +0800
committerDave Kleikamp <dave.kleikamp@oracle.com>2024-01-02 11:06:52 -0600
commita280c9ceeca73fad22af79b08b470fc7126cf1d5 (patch)
tree2f33b3659b38a3b97e943b918c7f675c40480bcb /fs/jfs
parent49f9637aafa6e63ba686c13cb8549bf5e6920402 (diff)
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: Kevin Hao <haokexin@gmail.com> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/jfs_txnmgr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index dccc8b3f1045..be17e3c43582 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -2702,6 +2702,7 @@ int jfs_lazycommit(void *arg)
unsigned long flags;
struct jfs_sb_info *sbi;
+ set_freezable();
do {
LAZY_LOCK(flags);
jfs_commit_thread_waking = 0; /* OK to wake another thread */
@@ -2884,6 +2885,7 @@ int jfs_sync(void *arg)
struct jfs_inode_info *jfs_ip;
tid_t tid;
+ set_freezable();
do {
/*
* write each inode on the anonymous inode list