summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-08-07 17:06:18 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2014-08-19 10:01:34 -0700
commit695facc05a3eaaf434911dc5dbbc3e6c6a4e1862 (patch)
tree3489cea28078600e87ed1223e60e1a3bb5ffe1fe /fs
parent617deb8c053aeec06c7aa16ac7225f046fab95e8 (diff)
downloadop-kernel-dev-695facc05a3eaaf434911dc5dbbc3e6c6a4e1862.zip
op-kernel-dev-695facc05a3eaaf434911dc5dbbc3e6c6a4e1862.tar.gz
f2fs: clear FI_INC_LINK during the recovery
If an inode are fsynced multiple times with fsync & dent marks, this inode will set FI_INC_LINK at find_fsync_dnodes during the recovery. But, in recover_inode, recover_dentry doesn't clear that flag when multiple hits were occurred. So this patch removes the flag for the further consistency. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/recovery.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index fe1c6d9..cfb2aa9 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -62,8 +62,10 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
}
retry:
de = f2fs_find_entry(dir, &name, &page);
- if (de && inode->i_ino == le32_to_cpu(de->ino))
+ if (de && inode->i_ino == le32_to_cpu(de->ino)) {
+ clear_inode_flag(F2FS_I(inode), FI_INC_LINK);
goto out_unmap_put;
+ }
if (de) {
einode = f2fs_iget(inode->i_sb, le32_to_cpu(de->ino));
if (IS_ERR(einode)) {
OpenPOWER on IntegriCloud