hostfs: use d_splice_alias() calling conventions to simplify failure exits
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 11 Nov 2023 06:11:47 +0000 (01:11 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Dec 2023 17:51:00 +0000 (12:51 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/hostfs/hostfs_kern.c

index ea87f24c6c3fae3e18d68f8e481c85c09a7a5b50..a73d27c4dd583becba8b81ce9047113b53f5ea83 100644 (file)
@@ -637,12 +637,8 @@ static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
 
        inode = hostfs_iget(ino->i_sb, name);
        __putname(name);
-       if (IS_ERR(inode)) {
-               if (PTR_ERR(inode) == -ENOENT)
-                       inode = NULL;
-               else
-                       return ERR_CAST(inode);
-       }
+       if (inode == ERR_PTR(-ENOENT))
+               inode = NULL;
 
        return d_splice_alias(inode, dentry);
 }