diff options
author | Christoph Hellwig <hch@lst.de> | 2008-08-11 15:49:04 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:01 -0400 |
commit | 440037287c5ebb07033ab927ca16bb68c291d309 (patch) | |
tree | c4be3843ea87a777c2647f471895917005d8068f /fs/ext3 | |
parent | 4ea3ada2955e4519befa98ff55dd62d6dfbd1705 (diff) | |
download | linux-exynos-440037287c5ebb07033ab927ca16bb68c291d309.tar.gz linux-exynos-440037287c5ebb07033ab927ca16bb68c291d309.tar.bz2 linux-exynos-440037287c5ebb07033ab927ca16bb68c291d309.zip |
[PATCH] switch all filesystems over to d_obtain_alias
Switch all users of d_alloc_anon to d_obtain_alias.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/namei.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index de13e919cd81..880b54400ac0 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1057,8 +1057,6 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str struct dentry *ext3_get_parent(struct dentry *child) { unsigned long ino; - struct dentry *parent; - struct inode *inode; struct dentry dotdot; struct ext3_dir_entry_2 * de; struct buffer_head *bh; @@ -1068,7 +1066,6 @@ struct dentry *ext3_get_parent(struct dentry *child) dotdot.d_parent = child; /* confusing, isn't it! */ bh = ext3_find_entry(&dotdot, &de); - inode = NULL; if (!bh) return ERR_PTR(-ENOENT); ino = le32_to_cpu(de->inode); @@ -1080,16 +1077,7 @@ struct dentry *ext3_get_parent(struct dentry *child) return ERR_PTR(-EIO); } - inode = ext3_iget(child->d_inode->i_sb, ino); - if (IS_ERR(inode)) - return ERR_CAST(inode); - - parent = d_alloc_anon(inode); - if (!parent) { - iput(inode); - parent = ERR_PTR(-ENOMEM); - } - return parent; + return d_obtain_alias(ext3_iget(child->d_inode->i_sb, ino)); } #define S_SHIFT 12 |