Skip to content

Commit

Permalink
omfs_lookup(): report IO errors, use d_splice_alias()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 22, 2018
1 parent 04bb1ba commit 18fbbfc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/omfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 18fbbfc

Please sign in to comment.