zonefs: d_splice_alias() will do the right thing on ERR_PTR() inode

Acked-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2023-11-11 01:13:58 -05:00
parent b85ea95d08
commit 00488aa211

View file

@ -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);
}