]>
Commit | Line | Data |
---|---|---|
300a759d JR |
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 | |
fda6bd2d | 3 | @@ -11838,10 +11838,9 @@ |
6f6082f9 | 4 | |
300a759d | 5 | down_read(¤t->mm->mmap_sem); |
6f6082f9 | 6 | |
fda6bd2d JR |
7 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73) |
8 | - mapped_pages = get_user_pages_unlocked((unsigned long)user_location, number_pages, | |
9 | - pages, rw); | |
10 | - | |
6f6082f9 | 11 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) |
300a759d JR |
12 | + mapped_pages = get_user_pages((ulong)user_location, number_pages, |
13 | + rw ? FOLL_WRITE : 0, pages, NULL); | |
fda6bd2d | 14 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) |
300a759d JR |
15 | mapped_pages = get_user_pages((ulong)user_location, number_pages, |
16 | rw, 0, pages, NULL); | |
300a759d JR |
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 | |
fda6bd2d | 19 | @@ -5205,11 +5205,13 @@ |
9752ce8d JR |
20 | if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL) |
21 | return -ENOMEM; | |
22 | ||
fda6bd2d JR |
23 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73) |
24 | - res = get_user_pages_unlocked(uaddr, nr_pages, | |
25 | - pages, | |
26 | - rw == READ ? FOLL_WRITE : 0); /* don't force */ | |
27 | - | |
6f6082f9 | 28 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) |
9752ce8d | 29 | + res = get_user_pages_unlocked( |
6f6082f9 JR |
30 | + uaddr, |
31 | + nr_pages, | |
300a759d | 32 | + rw == READ ? FOLL_WRITE : 0, |
6f6082f9 | 33 | + pages, |
300a759d | 34 | + NULL); |
fda6bd2d | 35 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21) |
9752ce8d JR |
36 | /* Try to fault in all of the necessary pages */ |
37 | /* rw==READ means read from drive, write into memory area */ |