From: Jeff Layton Date: Mon, 16 Nov 2009 20:05:20 +0000 (-0800) Subject: vfs: remove extraneous NULL d_inode check from do_filp_open X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb59861f03a626196a23fdef5e20ddbb8cca6466;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git vfs: remove extraneous NULL d_inode check from do_filp_open We can't get to this point unless it's a valid pointer. Signed-off-by: Jeff Layton Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index d2783c8a770b..dad4b80257db 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1764,7 +1764,7 @@ do_last: path_to_nameidata(&path, &nd); error = -EISDIR; - if (path.dentry->d_inode && S_ISDIR(path.dentry->d_inode->i_mode)) + if (S_ISDIR(path.dentry->d_inode->i_mode)) goto exit; ok: /*