[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>
This commit is contained in:
Christoph Hellwig
2008-08-11 15:49:04 +02:00
committed by Al Viro
parent 4ea3ada295
commit 440037287c
19 changed files with 78 additions and 305 deletions

View File

@ -1083,16 +1083,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