summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-04-11 19:15:33 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2017-04-12 12:57:07 -0700
commit309738835451739dc019dc3d5bb4c93d487ff36b (patch)
tree02154b451f2237170b223252fb308ed3d20b1321 /fs/f2fs
parent9bb02c3627f46e50246bf7ab957b56ffbef623cb (diff)
downloadlinux-stable-309738835451739dc019dc3d5bb4c93d487ff36b.tar.gz
linux-stable-309738835451739dc019dc3d5bb4c93d487ff36b.tar.bz2
linux-stable-309738835451739dc019dc3d5bb4c93d487ff36b.zip
f2fs: give time to flush dirty pages for checkpoint
If all the threads are waiting for checkpoint, we have no chance to flush required dirty pages. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/checkpoint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 9db92990f193..800be94f8cb3 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -980,6 +980,7 @@ retry_flush_dents:
err = sync_dirty_inodes(sbi, DIR_INODE);
if (err)
goto out;
+ cond_resched();
goto retry_flush_dents;
}
@@ -995,6 +996,7 @@ retry_flush_dents:
err = f2fs_sync_inode_meta(sbi);
if (err)
goto out;
+ cond_resched();
goto retry_flush_dents;
}
@@ -1009,6 +1011,7 @@ retry_flush_nodes:
f2fs_unlock_all(sbi);
goto out;
}
+ cond_resched();
goto retry_flush_nodes;
}