]> git.pld-linux.org Git - packages/lin_tape.git/blame - linux-4.9.patch
- fix building with linux 4.9
[packages/lin_tape.git] / linux-4.9.patch
CommitLineData
6f6082f9
JR
1--- lin_tape-3.0.8/lin_tape_scsi_tape.c~ 2017-01-21 20:53:26.000000000 +0100
2+++ lin_tape-3.0.8/lin_tape_scsi_tape.c 2017-01-21 20:58:23.919843647 +0100
3@@ -11480,7 +11480,9 @@
4
5 memset(pages, '\0', drv->supported_sg_tablesize * sizeof(struct page*));
6
7-#if LINUX_VERSION_CODE > KERNEL_VERSION(4,5,0)
8+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
9+ mapped_pages = get_user_pages_unlocked((ulong)user_location, number_pages, pages, rw ? FOLL_WRITE : 0);
10+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4,5,0)
11 mapped_pages = get_user_pages_unlocked((ulong)user_location, number_pages, rw, 0, pages);
12 #else
13 down_read(&current->mm->mmap_sem);
14--- lin_tape-3.0.8/stmp.c~ 2017-01-21 20:59:35.000000000 +0100
15+++ lin_tape-3.0.8/stmp.c 2017-01-21 21:01:53.144286074 +0100
16@@ -5329,7 +5329,13 @@
17
18 if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL)
19 return -ENOMEM;
20-#if LINUX_VERSION_CODE > KERNEL_VERSION(4,5,0)
21+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
22+ res = get_user_pages_unlocked(
23+ uaddr,
24+ nr_pages,
25+ pages,
26+ rw == READ ? FOLL_WRITE : 0);
27+#elif LINUX_VERSION_CODE > KERNEL_VERSION(4,5,0)
28 res = get_user_pages_unlocked(
29 uaddr,
30 nr_pages,
This page took 0.049457 seconds and 4 git commands to generate.