From: Al Viro Date: Wed, 20 Dec 2023 05:20:54 +0000 (+0000) Subject: ceph: d_obtain_{alias,root}(ERR_PTR(...)) will do the right thing X-Git-Tag: v6.8-rc1~24^2~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f6fb21b22fbe443f92b0d580391a7fb46d1840df;p=linux-block.git ceph: d_obtain_{alias,root}(ERR_PTR(...)) will do the right thing Clean up the code. Signed-off-by: Al Viro Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov --- 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); }