summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim2014-08-19 18:13:01 +0200
committerJaegeuk Kim2014-08-19 19:01:35 +0200
commit97c3c5cac2bba0ecc4b0de83d33a23aa427ef628 (patch)
tree01e86019499b61495d5ee7d60c4951a99b369c9c
parentf2fs: avoid bug_on when error is occurred (diff)
downloadkernel-qcow2-linux-97c3c5cac2bba0ecc4b0de83d33a23aa427ef628.tar.gz
kernel-qcow2-linux-97c3c5cac2bba0ecc4b0de83d33a23aa427ef628.tar.xz
kernel-qcow2-linux-97c3c5cac2bba0ecc4b0de83d33a23aa427ef628.zip
f2fs: don't skip checkpoint if there is no dirty node pages
This is the errorneous scenario. 1. write data 2. do checkpoint 3. produce some dirty node pages by the gc thread 4. write back dirty node pages 5. f2fs_put_super will skip the checkpoint, since dirty count for node pages is zero. This patch removes such the wrong condition check. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 633315acfef8..60e3554a6eb4 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -432,7 +432,7 @@ static void f2fs_put_super(struct super_block *sb)
stop_gc_thread(sbi);
/* We don't need to do checkpoint when it's clean */
- if (sbi->s_dirty && get_pages(sbi, F2FS_DIRTY_NODES))
+ if (sbi->s_dirty)
write_checkpoint(sbi, true);
iput(sbi->node_inode);