summarylogtreecommitdiffstats
path: root/kernel5.9up.patch
blob: e9cc8f3b8923579cbb8c43eb07b34f77e6e7caa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/module/rapiddisk.c	2020-10-28 13:46:38.672851445 +0100
+++ b/module/rapiddisk.c	2020-10-28 13:28:30.000000000 +0100
@@ -477,7 +477,11 @@
 #else
 static int
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
+rdsk_submit_bio(struct bio *bio)
+#else
 rdsk_make_request(struct request_queue *q, struct bio *bio)
+#endif
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
 	struct rdsk_device *rdsk = bio->bi_disk->private_data;
@@ -665,6 +669,9 @@
 static const struct block_device_operations rdsk_fops = {
 	.owner = THIS_MODULE,
 	.ioctl = rdsk_ioctl,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
+    .submit_bio = rdsk_submit_bio,
+#endif
 };
 
 static int attach_device(int size)
@@ -707,7 +714,11 @@
 	spin_lock_init(&rdsk->rdsk_lock);
 	INIT_RADIX_TREE(&rdsk->rdsk_pages, GFP_ATOMIC);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
+    rdsk->rdsk_queue = blk_alloc_queue(NUMA_NO_NODE);
+	if (!rdsk->rdsk_queue)
+		goto out_free_dev;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
 	rdsk->rdsk_queue = blk_alloc_queue(rdsk_make_request, NUMA_NO_NODE);
 	if (!rdsk->rdsk_queue)
 		goto out_free_dev;