aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-03-30 15:07:16 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-10 15:08:57 -0700
commit510022a85839a8409d1e6a519bb86ce71a84f30a (patch)
tree69c0d7bc575c378ee0de42ab03a29c349afb74dc /fs/f2fs/recovery.c
parentf2fs: fix mismatching lock and unlock pages for roll-forward recovery (diff)
downloadlinux-dev-510022a85839a8409d1e6a519bb86ce71a84f30a.tar.xz
linux-dev-510022a85839a8409d1e6a519bb86ce71a84f30a.zip
f2fs: add F2FS_INLINE_DOTS to recover missing dot dentries
If f2fs was corrupted with missing dot dentries, it needs to recover them after fsck.f2fs detection. The underlying precedure is: 1. The fsck.f2fs remains F2FS_INLINE_DOTS flag in directory inode, if it detects missing dot dentries. 2. When f2fs looks up the corrupted directory, it triggers f2fs_add_link with proper inode numbers and their dot and dotdot names. 3. Once f2fs recovers the directory without errors, it removes F2FS_INLINE_DOTS finally. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index c69de88a6453..679c465e9def 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -115,7 +115,7 @@ retry:
iput(einode);
goto retry;
}
- err = __f2fs_add_link(dir, &name, inode);
+ err = __f2fs_add_link(dir, &name, inode, inode->i_ino, inode->i_mode);
if (err)
goto out_err;