Skip to content

Commit f58b8c3

Browse files
author
Al Viro
committed
udf: d_obtain_alias(ERR_PTR(...)) will do the right thing...
Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 32328a7 commit f58b8c3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/udf/namei.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,6 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
897897
static struct dentry *udf_get_parent(struct dentry *child)
898898
{
899899
struct kernel_lb_addr tloc;
900-
struct inode *inode = NULL;
901900
struct udf_fileident_iter iter;
902901
int err;
903902

@@ -907,11 +906,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
907906

908907
tloc = lelb_to_cpu(iter.fi.icb.extLocation);
909908
udf_fiiter_release(&iter);
910-
inode = udf_iget(child->d_sb, &tloc);
911-
if (IS_ERR(inode))
912-
return ERR_CAST(inode);
913-
914-
return d_obtain_alias(inode);
909+
return d_obtain_alias(udf_iget(child->d_sb, &tloc));
915910
}
916911

917912

0 commit comments

Comments
 (0)