summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-03-22 10:23:46 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-24 20:10:51 +0100
commit99f4b917b0411f660b06ffd30f3dc36cf7b05710 (patch)
treeaf3ca3ac2f29cca058592a4576e8defd2970b9c4 /fs/f2fs/checkpoint.c
parentf2fs: show the max number of volatile operations (diff)
downloadlinux-99f4b917b0411f660b06ffd30f3dc36cf7b05710.tar.xz
linux-99f4b917b0411f660b06ffd30f3dc36cf7b05710.zip
f2fs: don't track volatile file in dirty inode list
Don't track volatile file in dirty inode list, otherwise with data_flush option, background thread will entry into endless loop for flushing journal file's pages. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/checkpoint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 7dd7dd5914c5..adcc2c370df9 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -817,7 +817,9 @@ static void __add_dirty_inode(struct inode *inode, enum inode_type type)
return;
set_inode_flag(inode, flag);
- list_add_tail(&F2FS_I(inode)->dirty_list, &sbi->inode_list[type]);
+ if (!f2fs_is_volatile_file(inode))
+ list_add_tail(&F2FS_I(inode)->dirty_list,
+ &sbi->inode_list[type]);
stat_inc_dirty_inode(sbi, type);
}