summaryrefslogtreecommitdiff
path: root/fs/hostfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-11-11 01:11:47 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2023-12-21 12:51:00 -0500
commit6f36230e235da4f34a831d20c51f0472e1a36f48 (patch)
treec96171cf65ffa4739bda4ef08f7745c841161a89 /fs/hostfs
parent5e7582f6e3a89d2fecf0a08e44ee02780c4cb4cf (diff)
hostfs: use d_splice_alias() calling conventions to simplify failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_kern.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index ea87f24c6c3f..a73d27c4dd58 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -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);
}