--- zzzz-none-000/linux-4.4.60/fs/open.c 2017-04-08 07:53:53.000000000 +0000 +++ wasp-540e-714/linux-4.4.60/fs/open.c 2019-07-03 09:21:34.000000000 +0000 @@ -673,7 +673,9 @@ { /* NB: we're sure to have correct a_ops only after f_op->open */ if (f->f_flags & O_DIRECT) { +#ifdef CONFIG_DIRECT_IO if (!f->f_mapping->a_ops || !f->f_mapping->a_ops->direct_IO) +#endif return -EINVAL; } return 0;