diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-25 16:08:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-08 02:55:04 -0500 |
commit | 69f24eac55725859a89c440ee2d19f36fa09e8fc (patch) | |
tree | c80080b85f62f961e6fdcda2d020fb1eff825cf8 /fs/f2fs/dir.c | |
parent | c004363dd6aa89f1ccbebd694f261f86db0c840a (diff) | |
download | linux-69f24eac55725859a89c440ee2d19f36fa09e8fc.tar.bz2 |
f2fs: switch init_inode_metadata() to passing parent and name separately
... sure, it's tempting to just pass dentry. Except that we don't
_have_ anything resembling a real dentry on one of the paths to it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index ca7948a2770d..208a804180d6 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -281,13 +281,12 @@ void init_dent_inode(const struct qstr *name, struct page *ipage) set_page_dirty(ipage); } -static int init_inode_metadata(struct inode *inode, struct dentry *dentry) +static int init_inode_metadata(struct inode *inode, + struct inode *dir, const struct qstr *name) { - struct inode *dir = dentry->d_parent->d_inode; - if (is_inode_flag_set(F2FS_I(inode), FI_NEW_INODE)) { int err; - err = new_inode_page(inode, &dentry->d_name); + err = new_inode_page(inode, name); if (err) return err; @@ -310,7 +309,7 @@ static int init_inode_metadata(struct inode *inode, struct dentry *dentry) if (IS_ERR(ipage)) return PTR_ERR(ipage); set_cold_node(inode, ipage); - init_dent_inode(&dentry->d_name, ipage); + init_dent_inode(name, ipage); f2fs_put_page(ipage, 1); } if (is_inode_flag_set(F2FS_I(inode), FI_INC_LINK)) { @@ -433,7 +432,7 @@ start: ++level; goto start; add_dentry: - err = init_inode_metadata(inode, dentry); + err = init_inode_metadata(inode, dir, &dentry->d_name); if (err) goto fail; |