diff options
author | Christoph Hellwig <hch@lst.de> | 2008-08-11 09:49:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:01 -0400 |
commit | 440037287c5ebb07033ab927ca16bb68c291d309 (patch) | |
tree | c4be3843ea87a777c2647f471895917005d8068f /fs/ext2 | |
parent | 4ea3ada2955e4519befa98ff55dd62d6dfbd1705 (diff) |
[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/ext2')
-rw-r--r-- | fs/ext2/namei.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 80c97fd8c571..a1b328ab1e55 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 | |||
73 | struct dentry *ext2_get_parent(struct dentry *child) | 73 | struct dentry *ext2_get_parent(struct dentry *child) |
74 | { | 74 | { |
75 | unsigned long ino; | 75 | unsigned long ino; |
76 | struct dentry *parent; | ||
77 | struct inode *inode; | ||
78 | struct dentry dotdot; | 76 | struct dentry dotdot; |
79 | 77 | ||
80 | dotdot.d_name.name = ".."; | 78 | dotdot.d_name.name = ".."; |
@@ -83,16 +81,7 @@ struct dentry *ext2_get_parent(struct dentry *child) | |||
83 | ino = ext2_inode_by_name(child->d_inode, &dotdot); | 81 | ino = ext2_inode_by_name(child->d_inode, &dotdot); |
84 | if (!ino) | 82 | if (!ino) |
85 | return ERR_PTR(-ENOENT); | 83 | return ERR_PTR(-ENOENT); |
86 | inode = ext2_iget(child->d_inode->i_sb, ino); | 84 | return d_obtain_alias(ext2_iget(child->d_inode->i_sb, ino)); |
87 | |||
88 | if (IS_ERR(inode)) | ||
89 | return ERR_CAST(inode); | ||
90 | parent = d_alloc_anon(inode); | ||
91 | if (!parent) { | ||
92 | iput(inode); | ||
93 | parent = ERR_PTR(-ENOMEM); | ||
94 | } | ||
95 | return parent; | ||
96 | } | 85 | } |
97 | 86 | ||
98 | /* | 87 | /* |