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-Tag: v2.6.33-rc1~34^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=cb59861f03a626196a23fdef5e20ddbb8cca6466;p=linux.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 @@ struct file *do_filp_open(int dfd, const char *pathname, 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: /*