提交 97c3c5ca 编写于 作者: J Jaegeuk Kim

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: NJaegeuk Kim <jaegeuk@kernel.org>
上级 b307384e
...@@ -432,7 +432,7 @@ static void f2fs_put_super(struct super_block *sb) ...@@ -432,7 +432,7 @@ static void f2fs_put_super(struct super_block *sb)
stop_gc_thread(sbi); stop_gc_thread(sbi);
/* We don't need to do checkpoint when it's clean */ /* 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); write_checkpoint(sbi, true);
iput(sbi->node_inode); iput(sbi->node_inode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册