提交 cb59861f 编写于 作者: J Jeff Layton 提交者: Al Viro

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: NJeff Layton <jlayton@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a3a065e3
......@@ -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:
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册