summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-01-29 08:57:59 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-02-22 16:07:23 -0800
commit17c19120eb7fa94d95013243a8cced8cc9e107e1 (patch)
treec950e334b8235cb80f926bfefeef99065148c4b2 /fs/f2fs/super.c
parentfa3d2bdf94879c3645b3688e88ca03deb3bb495a (diff)
downloadop-kernel-dev-17c19120eb7fa94d95013243a8cced8cc9e107e1.zip
op-kernel-dev-17c19120eb7fa94d95013243a8cced8cc9e107e1.tar.gz
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>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 58d9a55..9445a34 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -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);
OpenPOWER on IntegriCloud