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/udf | |
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/udf')
-rw-r--r-- | fs/udf/namei.c | 17 |
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 | ||
1244 | static struct dentry *udf_get_parent(struct dentry *child) | 1244 | static 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; | ||
1276 | out_unlock: | 1269 | out_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 | ||
1311 | static struct dentry *udf_fh_to_dentry(struct super_block *sb, | 1298 | static struct dentry *udf_fh_to_dentry(struct super_block *sb, |