[packages/lin_tape] - fix building with kernel 5.8 - rel 2

baggins baggins at pld-linux.org
Sun Aug 16 18:57:03 CEST 2020


commit c1802700ffd2e5038155f3d63cf756799196d883
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Aug 16 18:56:47 2020 +0200

    - fix building with kernel 5.8
    - rel 2

 kernel-5.8.patch | 26 ++++++++++++++++++++++++++
 lin_tape.spec    |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/lin_tape.spec b/lin_tape.spec
index cb8a5b8..ddf6e59 100644
--- a/lin_tape.spec
+++ b/lin_tape.spec
@@ -5,7 +5,7 @@
 # nothing to be placed to debuginfo package
 %define		_enable_debug_packages	0
 
-%define		rel	1
+%define		rel	2
 %define		pname	lin_tape
 Summary:	IBM Tape SCSI Device Driver for Linux
 Name:		%{pname}%{_alt_kernel}
@@ -20,6 +20,7 @@ Patch0:		use-module-dir.patch
 Patch1:		clean-ifdefs.patch
 Patch2:		kernel-5.0.patch
 Patch3:		kernel-5.6.patch
+Patch4:		kernel-5.8.patch
 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
 URL:		http://www.ibm.com/support/fixcentral/
 BuildRequires:	rpmbuild(macros) >= 1.701
@@ -71,6 +72,7 @@ compatible platforms.\
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 install -p %{SOURCE1} .
 
diff --git a/kernel-5.8.patch b/kernel-5.8.patch
new file mode 100644
index 0000000..e7027c2
--- /dev/null
+++ b/kernel-5.8.patch
@@ -0,0 +1,26 @@
+--- lin_tape-3.0.52/lin_tape_scsi_tape.c~	2020-03-05 19:43:09.000000000 +0100
++++ lin_tape-3.0.52/lin_tape_scsi_tape.c	2020-08-16 18:55:05.857678020 +0200
+@@ -11533,7 +11533,11 @@
+ 
+ 	memset(pages, '\0', drv->supported_sg_tablesize * sizeof(struct page*));
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
+ 	down_read(&current->mm->mmap_sem);
++#else
++	mmap_read_lock(current->mm);
++#endif
+ #if LINUX_VERSION_CODE == KERNEL_VERSION(4,4,73) \
+ 	|| (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,92) && LINUX_VERSION_CODE < KERNEL_VERSION(4,4,103)) \
+ 	|| defined(SLESKERNEL_4_4_103_6) \
+@@ -11548,7 +11552,11 @@
+ 	mapped_pages = get_user_pages(current, current->mm,
+ 		(ulong)user_location, number_pages, rw, 0, pages, NULL);
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
+ 	up_read(&current->mm->mmap_sem);
++#else
++	mmap_read_unlock(current->mm);
++#endif
+ 
+ 	if(mapped_pages < number_pages) {
+ 		rc = -EFAULT;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lin_tape.git/commitdiff/c1802700ffd2e5038155f3d63cf756799196d883



More information about the pld-cvs-commit mailing list