mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
44a9bb0698
commit
5a16718752
1 changed files with 7 additions and 0 deletions
|
@ -581,6 +581,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue