aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/namei.c')
-rw-r--r--fs/udf/namei.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index d3231947db19..7578fae12d3c 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1243,7 +1243,6 @@ end_rename:
1243 1243
1244static struct dentry *udf_get_parent(struct dentry *child) 1244static struct dentry *udf_get_parent(struct dentry *child)
1245{ 1245{
1246 struct dentry *parent;
1247 struct inode *inode = NULL; 1246 struct inode *inode = NULL;
1248 struct dentry dotdot; 1247 struct dentry dotdot;
1249 struct fileIdentDesc cfi; 1248 struct fileIdentDesc cfi;
@@ -1266,13 +1265,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
1266 goto out_unlock; 1265 goto out_unlock;
1267 unlock_kernel(); 1266 unlock_kernel();
1268 1267
1269 parent = d_alloc_anon(inode); 1268 return d_obtain_alias(inode);
1270 if (!parent) {
1271 iput(inode);
1272 parent = ERR_PTR(-ENOMEM);
1273 }
1274
1275 return parent;
1276out_unlock: 1269out_unlock:
1277 unlock_kernel(); 1270 unlock_kernel();
1278 return ERR_PTR(-EACCES); 1271 return ERR_PTR(-EACCES);
@@ -1283,7 +1276,6 @@ static struct dentry *udf_nfs_get_inode(struct super_block *sb, u32 block,
1283 u16 partref, __u32 generation) 1276 u16 partref, __u32 generation)
1284{ 1277{
1285 struct inode *inode; 1278 struct inode *inode;
1286 struct dentry *result;
1287 kernel_lb_addr loc; 1279 kernel_lb_addr loc;
1288 1280
1289 if (block == 0) 1281 if (block == 0)
@@ -1300,12 +1292,7 @@ static struct dentry *udf_nfs_get_inode(struct super_block *sb, u32 block,
1300 iput(inode); 1292 iput(inode);
1301 return ERR_PTR(-ESTALE); 1293 return ERR_PTR(-ESTALE);
1302 } 1294 }
1303 result = d_alloc_anon(inode); 1295 return d_obtain_alias(inode);
1304 if (!result) {
1305 iput(inode);
1306 return ERR_PTR(-ENOMEM);
1307 }
1308 return result;
1309} 1296}
1310 1297
1311static struct dentry *udf_fh_to_dentry(struct super_block *sb, 1298static struct dentry *udf_fh_to_dentry(struct super_block *sb,