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>
This commit is contained in:
Al Viro 2023-11-11 01:55:30 -05:00
parent 32328a73e0
commit f58b8c3ef7
1 changed files with 1 additions and 6 deletions

View File

@ -897,7 +897,6 @@ out_oiter:
static struct dentry *udf_get_parent(struct dentry *child)
{
struct kernel_lb_addr tloc;
struct inode *inode = NULL;
struct udf_fileident_iter iter;
int err;
@ -907,11 +906,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
tloc = lelb_to_cpu(iter.fi.icb.extLocation);
udf_fiiter_release(&iter);
inode = udf_iget(child->d_sb, &tloc);
if (IS_ERR(inode))
return ERR_CAST(inode);
return d_obtain_alias(inode);
return d_obtain_alias(udf_iget(child->d_sb, &tloc));
}