]> git.pld-linux.org Git - packages/lin_tape.git/blob - linux-4.9.patch
- up to 3.0.23
[packages/lin_tape.git] / linux-4.9.patch
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 @@
4  
5         down_read(&current->mm->mmap_sem);
6  
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 -
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,
16                                               rw, 0, pages, NULL);
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)
21                 return -ENOMEM;
22  
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 -
28 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
29 +       res = get_user_pages_unlocked(
30 +               uaddr,
31 +               nr_pages,
32 +               rw == READ ? FOLL_WRITE : 0,
33 +               pages,
34 +               NULL);
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 */
This page took 0.060121 seconds and 3 git commands to generate.