diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-08-29 18:23:45 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:02 +0200 |
| commit | 0b37ca8a476af835de0fa9d080fa51b4847c0888 (patch) | |
| tree | 2d0a0d0a95ca73f8c87e0da8f7e493393415c16f /fs/f2fs/checkpoint.c | |
| parent | e544412126549c5cda778af1ea1b377da65cad2e (diff) | |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index d4b6c1478..bae2a61fc 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1151,6 +1151,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; } |
