summaryrefslogtreecommitdiff
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-08-30 04:23:45 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2016-09-08 03:27:39 +0300
commitbbf156f7afa7f3cc07177f1119878f6f60855fd1 (patch)
treeaff5602ad821fcfeea2bd4cd3eb35017f101e7d9 /fs/f2fs/checkpoint.c
parent275b66b09e85cf0520dc610dd89706952751a473 (diff)
downloadlinux-bbf156f7afa7f3cc07177f1119878f6f60855fd1.tar.xz
f2fs: fix lost xattrs of directories
This patch enhances the xattr consistency of dirs from suddern power-cuts. Possible scenario would be: 1. dir->setxattr used by per-file encryption 2. file->setxattr goes into inline_xattr 3. file->fsync In that case, we should do checkpoint for #1. Otherwise we'd lose dir's key information for the file given #2. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 64a685d5c11b..727e97edf758 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1152,6 +1152,7 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
clear_prefree_segments(sbi, cpc);
clear_sbi_flag(sbi, SBI_IS_DIRTY);
+ clear_sbi_flag(sbi, SBI_NEED_CP);
return 0;
}