]> git.pld-linux.org Git - packages/lin_tape.git/blobdiff - linux-4.9.patch
- fix building with kernel 4.17
[packages/lin_tape.git] / linux-4.9.patch
index 78e28b4a49e62d2894232fe6cdbc43c948e56fcd..d35ff3b542f897d8d9b639a19f7465e049b13bca 100644 (file)
@@ -1,24 +1,30 @@
 --- lin_tape-3.0.18/lin_tape_scsi_tape.c~      2017-02-23 19:14:41.000000000 +0100
 +++ lin_tape-3.0.18/lin_tape_scsi_tape.c       2017-05-09 21:28:19.916320963 +0200
-@@ -11838,7 +11838,10 @@
+@@ -11838,10 +11838,9 @@
  
        down_read(&current->mm->mmap_sem);
  
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
+-      mapped_pages = get_user_pages_unlocked((unsigned long)user_location, number_pages,
+-                                            pages, rw);
+-
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
 +      mapped_pages = get_user_pages((ulong)user_location, number_pages,
 +                                            rw ? FOLL_WRITE : 0, pages, NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
        mapped_pages = get_user_pages((ulong)user_location, number_pages,
                                              rw, 0, pages, NULL);
- #else
 --- lin_tape-3.0.18/stmp.c~    2017-05-09 21:25:12.000000000 +0200
 +++ lin_tape-3.0.18/stmp.c     2017-05-09 21:29:19.121101188 +0200
-@@ -5205,7 +5205,14 @@
+@@ -5205,11 +5205,13 @@
        if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL)
                return -ENOMEM;
  
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,73)
+-      res = get_user_pages_unlocked(uaddr, nr_pages,
+-                                            pages,
+-                                                                rw == READ ? FOLL_WRITE : 0); /* don't force */
+-
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
 +      res = get_user_pages_unlocked(
 +              uaddr,
@@ -26,7 +32,6 @@
 +              rw == READ ? FOLL_WRITE : 0,
 +              pages,
 +              NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
      /* Try to fault in all of the necessary pages */
      /* rw==READ means read from drive, write into memory area */
-       res = get_user_pages_unlocked(
This page took 0.484638 seconds and 4 git commands to generate.