f2fs: flush pending checkpoints when freezing super
This avoids -EINVAL when trying to freeze f2fs. Cc: stable@vger.kernel.org Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -1657,9 +1657,8 @@ static int f2fs_freeze(struct super_block *sb)
|
||||
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;
|
||||
/* Let's flush checkpoints and stop the thread. */
|
||||
f2fs_flush_ckpt_thread(F2FS_SB(sb));
|
||||
|
||||
/* to avoid deadlock on f2fs_evict_inode->SB_FREEZE_FS */
|
||||
set_sbi_flag(F2FS_SB(sb), SBI_IS_FREEZING);
|
||||
|
||||
Reference in New Issue
Block a user