aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/namei.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-08-11 09:49:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-23 05:13:01 -0400
commit440037287c5ebb07033ab927ca16bb68c291d309 (patch)
treec4be3843ea87a777c2647f471895917005d8068f /fs/ext3/namei.c
parent4ea3ada2955e4519befa98ff55dd62d6dfbd1705 (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/ext3/namei.c')
-rw-r--r--fs/ext3/namei.c14
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
1057struct dentry *ext3_get_parent(struct dentry *child) 1057struct dentry *ext3_get_parent(struct dentry *child)
1058{ 1058{
1059 unsigned long ino; 1059 unsigned long ino;
1060 struct dentry *parent;
1061 struct inode *inode;
1062 struct dentry dotdot; 1060 struct dentry dotdot;
1063 struct ext3_dir_entry_2 * de; 1061 struct ext3_dir_entry_2 * de;
1064 struct buffer_head *bh; 1062 struct buffer_head *bh;
@@ -1068,7 +1066,6 @@ struct dentry *ext3_get_parent(struct dentry *child)
1068 dotdot.d_parent = child; /* confusing, isn't it! */ 1066 dotdot.d_parent = child; /* confusing, isn't it! */
1069 1067
1070 bh = ext3_find_entry(&dotdot, &de); 1068 bh = ext3_find_entry(&dotdot, &de);
1071 inode = NULL;
1072 if (!bh) 1069 if (!bh)
1073 return ERR_PTR(-ENOENT); 1070 return ERR_PTR(-ENOENT);
1074 ino = le32_to_cpu(de->inode); 1071 ino = le32_to_cpu(de->inode);
@@ -1080,16 +1077,7 @@ struct dentry *ext3_get_parent(struct dentry *child)
1080 return ERR_PTR(-EIO); 1077 return ERR_PTR(-EIO);
1081 } 1078 }
1082 1079
1083 inode = ext3_iget(child->d_inode->i_sb, ino); 1080 return d_obtain_alias(ext3_iget(child->d_inode->i_sb, ino));
1084 if (IS_ERR(inode))
1085 return ERR_CAST(inode);
1086
1087 parent = d_alloc_anon(inode);
1088 if (!parent) {
1089 iput(inode);
1090 parent = ERR_PTR(-ENOMEM);
1091 }
1092 return parent;
1093} 1081}
1094 1082
1095#define S_SHIFT 12 1083#define S_SHIFT 12