Skip to content

Commit a280c9c

Browse files
haokexinkleikamp
authored andcommitted
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>
1 parent 49f9637 commit a280c9c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/jfs/jfs_txnmgr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,7 @@ int jfs_lazycommit(void *arg)
27022702
unsigned long flags;
27032703
struct jfs_sb_info *sbi;
27042704

2705+
set_freezable();
27052706
do {
27062707
LAZY_LOCK(flags);
27072708
jfs_commit_thread_waking = 0; /* OK to wake another thread */
@@ -2884,6 +2885,7 @@ int jfs_sync(void *arg)
28842885
struct jfs_inode_info *jfs_ip;
28852886
tid_t tid;
28862887

2888+
set_freezable();
28872889
do {
28882890
/*
28892891
* write each inode on the anonymous inode list

0 commit comments

Comments
 (0)