aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/namei.c')
-rw-r--r--fs/reiserfs/namei.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index c1add28dd45e..f89ebb943f3f 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -383,7 +383,6 @@ struct dentry *reiserfs_get_parent(struct dentry *child)
383 struct inode *inode = NULL; 383 struct inode *inode = NULL;
384 struct reiserfs_dir_entry de; 384 struct reiserfs_dir_entry de;
385 INITIALIZE_PATH(path_to_entry); 385 INITIALIZE_PATH(path_to_entry);
386 struct dentry *parent;
387 struct inode *dir = child->d_inode; 386 struct inode *dir = child->d_inode;
388 387
389 if (dir->i_nlink == 0) { 388 if (dir->i_nlink == 0) {
@@ -401,15 +400,7 @@ struct dentry *reiserfs_get_parent(struct dentry *child)
401 inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&(de.de_dir_id)); 400 inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&(de.de_dir_id));
402 reiserfs_write_unlock(dir->i_sb); 401 reiserfs_write_unlock(dir->i_sb);
403 402
404 if (!inode || IS_ERR(inode)) { 403 return d_obtain_alias(inode);
405 return ERR_PTR(-EACCES);
406 }
407 parent = d_alloc_anon(inode);
408 if (!parent) {
409 iput(inode);
410 parent = ERR_PTR(-ENOMEM);
411 }
412 return parent;
413} 404}
414 405
415/* add entry to the directory (entry can be hidden). 406/* add entry to the directory (entry can be hidden).