1
0
Fork 0

omfs_lookup(): report IO errors, use d_splice_alias()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
hifive-unleashed-5.1
Al Viro 2018-04-30 20:00:22 -04:00
parent 04bb1ba141
commit 18fbbfc2bf
1 changed files with 3 additions and 4 deletions

View File

@ -305,11 +305,10 @@ static struct dentry *omfs_lookup(struct inode *dir, struct dentry *dentry,
ino_t ino = be64_to_cpu(oi->i_head.h_self);
brelse(bh);
inode = omfs_iget(dir->i_sb, ino);
if (IS_ERR(inode))
return ERR_CAST(inode);
} else if (bh != ERR_PTR(-ENOENT)) {
inode = ERR_CAST(bh);
}
d_add(dentry, inode);
return NULL;
return d_splice_alias(inode, dentry);
}
/* sanity check block's self pointer */