diff mbox series

[07/22] ceph: d_obtain_{alias,root}(ERR_PTR(...)) will do the right thing

Message ID 20231220052054.GF1674809@ZenIV (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

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

Comments

Xiubo Li Dec. 21, 2023, 12:35 a.m. UTC | #1
On 12/20/23 13:20, Al Viro wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>   fs/ceph/export.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/fs/ceph/export.c b/fs/ceph/export.c
> index 726af69d4d62..a79f163ae4ed 100644
> --- a/fs/ceph/export.c
> +++ b/fs/ceph/export.c
> @@ -286,8 +286,6 @@ static struct dentry *__snapfh_to_dentry(struct super_block *sb,
>   		doutc(cl, "%llx.%llx parent %llx hash %x err=%d", vino.ino,
>   		      vino.snap, sfh->parent_ino, sfh->hash, err);
>   	}
> -	if (IS_ERR(inode))
> -		return ERR_CAST(inode);
>   	/* see comments in ceph_get_parent() */
>   	return unlinked ? d_obtain_root(inode) : d_obtain_alias(inode);
>   }

Reviewed-by: Xiubo Li <xiubli@redhat.com>

Thanks!
diff mbox series

Patch

diff --git a/fs/ceph/export.c b/fs/ceph/export.c
index 726af69d4d62..a79f163ae4ed 100644
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -286,8 +286,6 @@  static struct dentry *__snapfh_to_dentry(struct super_block *sb,
 		doutc(cl, "%llx.%llx parent %llx hash %x err=%d", vino.ino,
 		      vino.snap, sfh->parent_ino, sfh->hash, err);
 	}
-	if (IS_ERR(inode))
-		return ERR_CAST(inode);
 	/* see comments in ceph_get_parent() */
 	return unlinked ? d_obtain_root(inode) : d_obtain_alias(inode);
 }