X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext4%2Fnamei.c;h=63adcb792988016d642a6e341bcbca2f694b68d1;hb=3856d30ded1fe43c6657927ebad402d25cd128f4;hp=92db9e94514779dce3d0cdccdcc78bc4e12ea465;hpb=07104839597803ccd9b2c4f543ee4651522b4aa1;p=linux-2.6-omap-h63xx.git diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 92db9e94514..63adcb79298 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1061,7 +1061,6 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru struct dentry *ext4_get_parent(struct dentry *child) { unsigned long ino; - struct dentry *parent; struct inode *inode; static const struct qstr dotdot = { .name = "..", @@ -1083,16 +1082,7 @@ struct dentry *ext4_get_parent(struct dentry *child) return ERR_PTR(-EIO); } - inode = ext4_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(ext4_iget(child->d_inode->i_sb, ino)); } #define S_SHIFT 12