summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-03-08 23:36:51 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:24:32 -0400
commite5b811e38af7540b385c898d83eb0198310343fd (patch)
tree8f7534fad9314aa9bd8af9c33053b41d7e0d8445 /fs/open.c
parent3f7036a071b879da017eddaedb10fba173fdf1ff (diff)
downloadop-kernel-dev-e5b811e38af7540b385c898d83eb0198310343fd.zip
op-kernel-dev-e5b811e38af7540b385c898d83eb0198310343fd.tar.gz
drop bogus check in file_open_root()
For one thing, LOOKUP_DIRECTORY will be dealt with in do_last(). For another, name can be an empty string, but not NULL - no callers pass that and it would oops immediately if they would. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c
index 33f9cbf..ebcc7df 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -988,9 +988,6 @@ struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt,
return ERR_PTR(err);
if (flags & O_CREAT)
return ERR_PTR(-EINVAL);
- if (!filename && (flags & O_DIRECTORY))
- if (!dentry->d_inode->i_op->lookup)
- return ERR_PTR(-ENOTDIR);
return do_file_open_root(dentry, mnt, filename, &op);
}
EXPORT_SYMBOL(file_open_root);
OpenPOWER on IntegriCloud