diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-25 16:15:43 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-08 02:55:04 -0500 |
commit | b7f7a5e0be94d13875a1c6c9aa65eeb11a46fc1b (patch) | |
tree | 69145a46a70aae7ba6bf0e03b46617bbb74f1a1b /fs/f2fs/recovery.c | |
parent | 69f24eac55725859a89c440ee2d19f36fa09e8fc (diff) | |
download | linux-b7f7a5e0be94d13875a1c6c9aa65eeb11a46fc1b.tar.bz2 |
f2fs: get rid of fake on-stack dentries
those should never be used for a lot of reasons...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b571fee677d5..62000422879a 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -42,7 +42,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode) { struct f2fs_node *raw_node = (struct f2fs_node *)kmap(ipage); struct f2fs_inode *raw_inode = &(raw_node->i); - struct dentry dent, parent; + struct qstr name; struct f2fs_dir_entry *de; struct page *page; struct inode *dir; @@ -57,17 +57,15 @@ static int recover_dentry(struct page *ipage, struct inode *inode) goto out; } - parent.d_inode = dir; - dent.d_parent = &parent; - dent.d_name.len = le32_to_cpu(raw_inode->i_namelen); - dent.d_name.name = raw_inode->i_name; + name.len = le32_to_cpu(raw_inode->i_namelen); + name.name = raw_inode->i_name; - de = f2fs_find_entry(dir, &dent.d_name, &page); + de = f2fs_find_entry(dir, &name, &page); if (de) { kunmap(page); f2fs_put_page(page, 0); } else { - f2fs_add_link(&dent, inode); + __f2fs_add_link(dir, &name, inode); } iput(dir); out: |