1 --- lin_tape-3.0.18/lin_tape_scsi_tape.c~ 2017-02-23 19:14:41.000000000 +0100
2 +++ lin_tape-3.0.18/lin_tape_scsi_tape.c 2017-05-09 21:28:19.916320963 +0200
3 @@ -11838,7 +11838,10 @@
5 down_read(¤t->mm->mmap_sem);
7 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
9 + mapped_pages = get_user_pages((ulong)user_location, number_pages,
10 + rw ? FOLL_WRITE : 0, pages, NULL);
11 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
12 mapped_pages = get_user_pages((ulong)user_location, number_pages,
15 --- lin_tape-3.0.18/stmp.c~ 2017-05-09 21:25:12.000000000 +0200
16 +++ lin_tape-3.0.18/stmp.c 2017-05-09 21:29:19.121101188 +0200
17 @@ -5205,7 +5205,14 @@
18 /* Try to fault in all of the necessary pages */
19 down_read(¤t->mm->mmap_sem);
20 /* rw==READ means read from drive, write into memory area */
21 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
22 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
23 + res = get_user_pages(
26 + rw == READ ? FOLL_WRITE : 0,
29 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)