Skip to content

Commit 96931df

Browse files
author
Al Viro
committed
nilfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing...
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 00488aa commit 96931df

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/nilfs2/namei.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ static int nilfs_rename(struct mnt_idmap *idmap,
439439
static struct dentry *nilfs_get_parent(struct dentry *child)
440440
{
441441
unsigned long ino;
442-
struct inode *inode;
443442
struct nilfs_root *root;
444443

445444
ino = nilfs_inode_by_name(d_inode(child), &dotdot_name);
@@ -448,11 +447,7 @@ static struct dentry *nilfs_get_parent(struct dentry *child)
448447

449448
root = NILFS_I(d_inode(child))->i_root;
450449

451-
inode = nilfs_iget(child->d_sb, root, ino);
452-
if (IS_ERR(inode))
453-
return ERR_CAST(inode);
454-
455-
return d_obtain_alias(inode);
450+
return d_obtain_alias(nilfs_iget(child->d_sb, root, ino));
456451
}
457452

458453
static struct dentry *nilfs_get_dentry(struct super_block *sb, u64 cno,

0 commit comments

Comments
 (0)