Skip to content

Commit

Permalink
Kernel 4.14 onwards: __vfs_read not exported any more, replace with k…
Browse files Browse the repository at this point in the history
…ernel_read
  • Loading branch information
r-or committed Nov 11, 2017
1 parent b33c29f commit 700398c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion os_dep/osdep_service.c
Expand Up @@ -2023,8 +2023,10 @@ static int readFile(struct file *fp, char *buf, int len)
return -EPERM;

while (sum < len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
#else
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
#endif
Expand Down

0 comments on commit 700398c

Please sign in to comment.