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,10 +11838,9 @@
5 down_read(¤t->mm->mmap_sem);
7 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
8 - mapped_pages = get_user_pages_unlocked((unsigned long)user_location, number_pages,
11 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
12 + mapped_pages = get_user_pages((ulong)user_location, number_pages,
13 + rw ? FOLL_WRITE : 0, pages, NULL);
14 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
15 mapped_pages = get_user_pages((ulong)user_location, number_pages,
17 --- lin_tape-3.0.18/stmp.c~ 2017-05-09 21:25:12.000000000 +0200
18 +++ lin_tape-3.0.18/stmp.c 2017-05-09 21:29:19.121101188 +0200
19 @@ -5205,11 +5205,13 @@
20 if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL)
23 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
24 - res = get_user_pages_unlocked(uaddr, nr_pages,
26 - rw == READ ? FOLL_WRITE : 0); /* don't force */
28 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
29 + res = get_user_pages_unlocked(
32 + rw == READ ? FOLL_WRITE : 0,
35 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
36 /* Try to fault in all of the necessary pages */
37 /* rw==READ means read from drive, write into memory area */