Skip to content

Commit

Permalink
vfs: remove extraneous NULL d_inode check from do_filp_open
Browse files Browse the repository at this point in the history
We can't get to this point unless it's a valid pointer.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 17, 2009
1 parent a3a065e commit cb59861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/*
Expand Down

0 comments on commit cb59861

Please sign in to comment.