diff mbox series

[03/22] zonefs: d_splice_alias() will do the right thing on ERR_PTR() inode

Message ID 20231220051736.GB1674809@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

Commit Message

Al Viro Dec. 20, 2023, 5:17 a.m. UTC
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/zonefs/super.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Damien Le Moal Dec. 20, 2023, 7:09 a.m. UTC | #1
On 12/20/23 14:17, Al Viro wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>  fs/zonefs/super.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index e6a75401677d..93971742613a 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -747,8 +747,6 @@ static struct dentry *zonefs_lookup(struct inode *dir, struct dentry *dentry,
>  		inode = zonefs_get_dir_inode(dir, dentry);
>  	else
>  		inode = zonefs_get_file_inode(dir, dentry);
> -	if (IS_ERR(inode))
> -		return ERR_CAST(inode);
>  
>  	return d_splice_alias(inode, dentry);
>  }

Acked-by: Damien Le Moal <dlemoal@kernel.org>
diff mbox series

Patch

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index e6a75401677d..93971742613a 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -747,8 +747,6 @@  static struct dentry *zonefs_lookup(struct inode *dir, struct dentry *dentry,
 		inode = zonefs_get_dir_inode(dir, dentry);
 	else
 		inode = zonefs_get_file_inode(dir, dentry);
-	if (IS_ERR(inode))
-		return ERR_CAST(inode);
 
 	return d_splice_alias(inode, dentry);
 }