--- zzzz-none-000/linux-4.4.60/fs/fcntl.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/fs/fcntl.c 2021-02-04 17:41:59.000000000 +0000 @@ -52,8 +52,10 @@ arg |= O_NONBLOCK; if (arg & O_DIRECT) { +#ifdef CONFIG_DIRECT_IO if (!filp->f_mapping || !filp->f_mapping->a_ops || !filp->f_mapping->a_ops->direct_IO) +#endif return -EINVAL; } @@ -138,6 +140,7 @@ read_unlock(&filp->f_owner.lock); return pid; } +EXPORT_SYMBOL(sys_dup); static int f_setown_ex(struct file *filp, unsigned long arg) {