diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-08 23:36:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:32 -0400 |
commit | e5b811e38af7540b385c898d83eb0198310343fd (patch) | |
tree | 8f7534fad9314aa9bd8af9c33053b41d7e0d8445 | |
parent | 3f7036a071b879da017eddaedb10fba173fdf1ff (diff) |
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>
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -988,9 +988,6 @@ struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt, | |||
988 | return ERR_PTR(err); | 988 | return ERR_PTR(err); |
989 | if (flags & O_CREAT) | 989 | if (flags & O_CREAT) |
990 | return ERR_PTR(-EINVAL); | 990 | return ERR_PTR(-EINVAL); |
991 | if (!filename && (flags & O_DIRECTORY)) | ||
992 | if (!dentry->d_inode->i_op->lookup) | ||
993 | return ERR_PTR(-ENOTDIR); | ||
994 | return do_file_open_root(dentry, mnt, filename, &op); | 991 | return do_file_open_root(dentry, mnt, filename, &op); |
995 | } | 992 | } |
996 | EXPORT_SYMBOL(file_open_root); | 993 | EXPORT_SYMBOL(file_open_root); |