diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/open.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -808,7 +808,9 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags) | |||
808 | 808 | ||
809 | /* NB: we're sure to have correct a_ops only after f_op->open */ | 809 | /* NB: we're sure to have correct a_ops only after f_op->open */ |
810 | if (f->f_flags & O_DIRECT) { | 810 | if (f->f_flags & O_DIRECT) { |
811 | if (!f->f_mapping->a_ops || !f->f_mapping->a_ops->direct_IO) { | 811 | if (!f->f_mapping->a_ops || |
812 | ((!f->f_mapping->a_ops->direct_IO) && | ||
813 | (!f->f_mapping->a_ops->get_xip_page))) { | ||
812 | fput(f); | 814 | fput(f); |
813 | f = ERR_PTR(-EINVAL); | 815 | f = ERR_PTR(-EINVAL); |
814 | } | 816 | } |