diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -667,11 +667,8 @@ int open_check_o_direct(struct file *f) | |||
667 | { | 667 | { |
668 | /* NB: we're sure to have correct a_ops only after f_op->open */ | 668 | /* NB: we're sure to have correct a_ops only after f_op->open */ |
669 | if (f->f_flags & O_DIRECT) { | 669 | if (f->f_flags & O_DIRECT) { |
670 | if (!f->f_mapping->a_ops || | 670 | if (!f->f_mapping->a_ops || !f->f_mapping->a_ops->direct_IO) |
671 | ((!f->f_mapping->a_ops->direct_IO) && | ||
672 | (!f->f_mapping->a_ops->get_xip_mem))) { | ||
673 | return -EINVAL; | 671 | return -EINVAL; |
674 | } | ||
675 | } | 672 | } |
676 | return 0; | 673 | return 0; |
677 | } | 674 | } |