Message ID | 20231220052359.GJ1674809@ZenIV (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | PATCH 01/22] hostfs: use d_splice_alias() calling conventions to simplify failure exits | expand |
On Wed 20-12-23 05:23:59, Al Viro wrote: > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Looks good. Acked-by: Jan Kara <jack@suse.cz> Honza > --- > fs/udf/namei.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/fs/udf/namei.c b/fs/udf/namei.c > index 92f25e540430..a64102d63781 100644 > --- a/fs/udf/namei.c > +++ b/fs/udf/namei.c > @@ -897,7 +897,6 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir, > 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)); > } > > > -- > 2.39.2 >
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 92f25e540430..a64102d63781 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -897,7 +897,6 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir, 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)); }
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> --- fs/udf/namei.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)