Skip to content

Commit 6f36230

Browse files
author
Al Viro
committed
hostfs: use d_splice_alias() calling conventions to simplify failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 5e7582f commit 6f36230

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

fs/hostfs/hostfs_kern.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,12 +637,8 @@ static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
637637

638638
inode = hostfs_iget(ino->i_sb, name);
639639
__putname(name);
640-
if (IS_ERR(inode)) {
641-
if (PTR_ERR(inode) == -ENOENT)
642-
inode = NULL;
643-
else
644-
return ERR_CAST(inode);
645-
}
640+
if (inode == ERR_PTR(-ENOENT))
641+
inode = NULL;
646642

647643
return d_splice_alias(inode, dentry);
648644
}

0 commit comments

Comments
 (0)