Commit 17c19120 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: flush bios to handle cp_error in put_super

Sometimes, if cp_error is set, there remains under-writeback pages, resulting in
kernel hang in put_super.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent fa3d2bdf
......@@ -582,6 +582,13 @@ static void f2fs_put_super(struct super_block *sb)
f2fs_leave_shrinker(sbi);
mutex_unlock(&sbi->umount_mutex);
/* our cp_error case, we can wait for any writeback page */
if (get_pages(sbi, F2FS_WRITEBACK)) {
f2fs_submit_merged_bio(sbi, DATA, WRITE);
f2fs_submit_merged_bio(sbi, NODE, WRITE);
f2fs_submit_merged_bio(sbi, META, WRITE);
}
iput(sbi->node_inode);
iput(sbi->meta_inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment