summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim2014-08-12 03:37:46 +0200
committerJaegeuk Kim2014-08-21 18:21:02 +0200
commit8501017e50fb7586ba522a2913ce664d6c2024f6 (patch)
treebfb14ec6356d4d760553e235644be9f146462eff /fs/f2fs/super.c
parentf2fs: unlock_page when node page is redirtied out (diff)
downloadkernel-qcow2-linux-8501017e50fb7586ba522a2913ce664d6c2024f6.tar.gz
kernel-qcow2-linux-8501017e50fb7586ba522a2913ce664d6c2024f6.tar.xz
kernel-qcow2-linux-8501017e50fb7586ba522a2913ce664d6c2024f6.zip
f2fs: check s_dirty under cp_mutex
It needs to check s_dirty under cp_mutex, since s_dirty is reset under that mutex. And previous condition was not correct, since we can omit doing checkpoint when checkpoint was done followed by all the node pages were written back. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8aabe3ef42f6..e7a7b619ffd4 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -460,9 +460,6 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
trace_f2fs_sync_fs(sb, sync);
- if (!sbi->s_dirty && !get_pages(sbi, F2FS_DIRTY_NODES))
- return 0;
-
if (sync) {
mutex_lock(&sbi->gc_mutex);
write_checkpoint(sbi, false);