aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/inline.c
diff options
context:
space:
mode:
authorSheng Yong <shengyong1@huawei.com>2016-06-04 22:01:28 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:33:46 +0200
commite718efab5f02213a049308426e0eb724eb6f5f5f (patch)
tree995665ef34e09bfb184fe5f2cc55d9c714984f83 /fs/f2fs/inline.c
parentccd38b18cce3189096feb8b02798e1b6659a6361 (diff)
f2fs: find parent dentry correctly
If dotdot directory is corrupted, its slot may be ocupied by another file. In this case, dentry[1] is not the parent directory. Rename and cross-rename will update the inode in dentry[1] incorrectly. This patch finds dotdot dentry by name. Signed-off-by: Sheng Yong <shengyong1@huawei.com> [Jaegeuk Kim: remove wron bug_on] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: fs/f2fs/f2fs.h
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r--fs/f2fs/inline.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 4dd6c8e70..1a3e56544 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -306,25 +306,6 @@ struct f2fs_dir_entry *find_in_inline_dir(struct inode *dir,
return de;
}
-struct f2fs_dir_entry *f2fs_parent_inline_dir(struct inode *dir,
- struct page **p)
-{
- struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
- struct page *ipage;
- struct f2fs_dir_entry *de;
- struct f2fs_inline_dentry *dentry_blk;
-
- ipage = get_node_page(sbi, dir->i_ino);
- if (IS_ERR(ipage))
- return NULL;
-
- dentry_blk = inline_data_addr(ipage);
- de = &dentry_blk->dentry[1];
- *p = ipage;
- unlock_page(ipage);
- return de;
-}
-
int make_empty_inline_dir(struct inode *inode, struct inode *parent,
struct page *ipage)
{