--- zzzz-none-000/linux-4.4.271/fs/fcntl.c 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/fs/fcntl.c 2023-04-19 10:22:30.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; } @@ -142,6 +144,7 @@ read_unlock(&filp->f_owner.lock); return pid; } +EXPORT_SYMBOL(sys_dup); static int f_setown_ex(struct file *filp, unsigned long arg) {