diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-30 20:00:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 14:27:58 -0400 |
commit | 18fbbfc2bfab4c45074bddb16c478b4366a265d5 (patch) | |
tree | 9c8bc577114fc045cc3ca0920493f8b34a28e2b6 | |
parent | 04bb1ba14195fb5b7ddb343f7d637149662accc8 (diff) |
omfs_lookup(): report IO errors, use d_splice_alias()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/omfs/dir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c index b7146526afff..4bee3a72b9f3 100644 --- a/fs/omfs/dir.c +++ b/fs/omfs/dir.c | |||
@@ -305,11 +305,10 @@ static struct dentry *omfs_lookup(struct inode *dir, struct dentry *dentry, | |||
305 | ino_t ino = be64_to_cpu(oi->i_head.h_self); | 305 | ino_t ino = be64_to_cpu(oi->i_head.h_self); |
306 | brelse(bh); | 306 | brelse(bh); |
307 | inode = omfs_iget(dir->i_sb, ino); | 307 | inode = omfs_iget(dir->i_sb, ino); |
308 | if (IS_ERR(inode)) | 308 | } else if (bh != ERR_PTR(-ENOENT)) { |
309 | return ERR_CAST(inode); | 309 | inode = ERR_CAST(bh); |
310 | } | 310 | } |
311 | d_add(dentry, inode); | 311 | return d_splice_alias(inode, dentry); |
312 | return NULL; | ||
313 | } | 312 | } |
314 | 313 | ||
315 | /* sanity check block's self pointer */ | 314 | /* sanity check block's self pointer */ |