From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Sat, 14 Jan 2006 21:21:09 +0000 (-0800)
Subject: [PATCH] reiserfs: remove d_splice_alias NULL check from reiserfs_lookup
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9975d6ba0668aa21d9f0c565d7df56c805c8d5c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git

[PATCH] reiserfs: remove d_splice_alias NULL check from reiserfs_lookup

Remove redundant NULL check in reiserfs_lookup() as d_splice_alias() can take
NULL inode as input.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---

diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 3549067c42d9..8f8d8d01107c 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -375,11 +375,7 @@ static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry,
 		return ERR_PTR(-EIO);
 	}
 
-	if (inode)
-		return d_splice_alias(inode, dentry);
-
-	d_add(dentry, inode);
-	return NULL;
+	return d_splice_alias(inode, dentry);
 }
 
 /*