From a9049376ee05bf966bfe2b081b5071326856890a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 8 Jul 2011 21:20:11 -0400 Subject: make d_splice_alias(ERR_PTR(err), dentry) = ERR_PTR(err) ... and simplify the living hell out of callers Signed-off-by: Al Viro --- fs/isofs/namei.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'fs/isofs') diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 4fb3e80..68fa503 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -183,14 +183,9 @@ struct dentry *isofs_lookup(struct inode *dir, struct dentry *dentry, struct nam 1024 + page_address(page)); __free_page(page); - inode = NULL; - if (found) { - inode = isofs_iget(dir->i_sb, block, offset); - if (IS_ERR(inode)) { - mutex_unlock(&sbi->s_mutex); - return ERR_CAST(inode); - } - } + inode = found ? isofs_iget(dir->i_sb, block, offset) : NULL; + mutex_unlock(&sbi->s_mutex); + return d_splice_alias(inode, dentry); } -- cgit v1.1