X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext2%2Fnamei.c;h=a1b328ab1e55d52877fb814db852d74f019533e7;hb=440037287c5;hp=80c97fd8c571311280042d45343c9c220e458dd9;hpb=4ea3ada2955e4519befa98ff55dd62d6dfbd1705;p=linux-2.6-omap-h63xx.git diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 80c97fd8c57..a1b328ab1e5 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -73,8 +73,6 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str struct dentry *ext2_get_parent(struct dentry *child) { unsigned long ino; - struct dentry *parent; - struct inode *inode; struct dentry dotdot; dotdot.d_name.name = ".."; @@ -83,16 +81,7 @@ struct dentry *ext2_get_parent(struct dentry *child) ino = ext2_inode_by_name(child->d_inode, &dotdot); if (!ino) return ERR_PTR(-ENOENT); - inode = ext2_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(ext2_iget(child->d_inode->i_sb, ino)); } /*