]>
Commit | Line | Data |
---|---|---|
c1802700 JR |
1 | --- lin_tape-3.0.52/lin_tape_scsi_tape.c~ 2020-03-05 19:43:09.000000000 +0100 |
2 | +++ lin_tape-3.0.52/lin_tape_scsi_tape.c 2020-08-16 18:55:05.857678020 +0200 | |
3 | @@ -11533,7 +11533,11 @@ | |
4 | ||
5 | memset(pages, '\0', drv->supported_sg_tablesize * sizeof(struct page*)); | |
6 | ||
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) | |
8 | down_read(¤t->mm->mmap_sem); | |
9 | +#else | |
10 | + mmap_read_lock(current->mm); | |
11 | +#endif | |
12 | #if LINUX_VERSION_CODE == KERNEL_VERSION(4,4,73) \ | |
13 | || (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,92) && LINUX_VERSION_CODE < KERNEL_VERSION(4,4,103)) \ | |
14 | || defined(SLESKERNEL_4_4_103_6) \ | |
15 | @@ -11548,7 +11552,11 @@ | |
16 | mapped_pages = get_user_pages(current, current->mm, | |
17 | (ulong)user_location, number_pages, rw, 0, pages, NULL); | |
18 | #endif | |
19 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) | |
20 | up_read(¤t->mm->mmap_sem); | |
21 | +#else | |
22 | + mmap_read_unlock(current->mm); | |
23 | +#endif | |
24 | ||
25 | if(mapped_pages < number_pages) { | |
26 | rc = -EFAULT; |