summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2021-02-08 13:42:21 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-02-08 13:42:21 -0800
commitd50dfc0c7df7bf037442045fbe63952ae0c4ce46 (patch)
tree23e47dcde1642156a1442420b8c611d166aae511 /fs/f2fs/super.c
parente65920661708b7c0f3db45c9cd5d0095034ee37f (diff)
downloadlinux-d50dfc0c7df7bf037442045fbe63952ae0c4ce46.tar.bz2
f2fs: don't grab superblock freeze for flush/ckpt thread
There are controlled by f2fs_freeze(). This fixes xfstests/generic/068 which is stuck at task:f2fs_ckpt-252:3 state:D stack: 0 pid: 5761 ppid: 2 flags:0x00004000 Call Trace: __schedule+0x44c/0x8a0 schedule+0x4f/0xc0 percpu_rwsem_wait+0xd8/0x140 ? percpu_down_write+0xf0/0xf0 __percpu_down_read+0x56/0x70 issue_checkpoint_thread+0x12c/0x160 [f2fs] ? wait_woken+0x80/0x80 kthread+0x114/0x150 ? __checkpoint_and_complete_reqs+0x110/0x110 [f2fs] ? kthread_park+0x90/0x90 ret_from_fork+0x22/0x30 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1000d21120ca..4aa533cb4340 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1472,6 +1472,10 @@ static int f2fs_freeze(struct super_block *sb)
/* must be clean, since sync_filesystem() was already called */
if (is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY))
return -EINVAL;
+
+ /* ensure no checkpoint required */
+ if (!llist_empty(&F2FS_SB(sb)->cprc_info.issue_list))
+ return -EINVAL;
return 0;
}