]>
Commit | Line | Data |
---|---|---|
02b69e51 | 1 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_fs.c drbd-0.7.22.new/drbd/drbd_fs.c |
2 | --- drbd-0.7.22.orig/drbd/drbd_fs.c 2006-12-21 01:16:11.000000000 +0100 | |
3 | +++ drbd-0.7.22.new/drbd/drbd_fs.c 2006-12-21 01:35:59.000000000 +0100 | |
4 | @@ -28,7 +28,12 @@ | |
5 | ||
6 | */ | |
7 | ||
8 | +#include <linux/version.h> | |
9 | + | |
10 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
11 | #include <linux/config.h> | |
12 | +#endif | |
13 | + | |
14 | #include <linux/module.h> | |
15 | ||
16 | #include <asm/uaccess.h> | |
17 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_main.c drbd-0.7.22.new/drbd/drbd_main.c | |
18 | --- drbd-0.7.22.orig/drbd/drbd_main.c 2006-12-21 01:16:11.000000000 +0100 | |
19 | +++ drbd-0.7.22.new/drbd/drbd_main.c 2006-12-21 01:37:02.000000000 +0100 | |
20 | @@ -31,9 +31,13 @@ | |
21 | ||
22 | */ | |
23 | ||
24 | +#include <linux/version.h> | |
25 | + | |
26 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
27 | #include <linux/config.h> | |
28 | +#endif | |
29 | + | |
30 | #include <linux/module.h> | |
31 | -#include <linux/version.h> | |
32 | ||
33 | #include <asm/uaccess.h> | |
34 | #include <asm/types.h> | |
35 | @@ -1627,12 +1631,24 @@ void drbd_destroy_mempools(void) | |
36 | { | |
37 | if (drbd_request_mempool) | |
38 | mempool_destroy(drbd_request_mempool); | |
39 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
40 | if (drbd_ee_cache && kmem_cache_destroy(drbd_ee_cache)) | |
41 | +#endif | |
42 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) | |
43 | + | |
44 | + kmem_cache_destroy(drbd_ee_cache); | |
45 | + kmem_cache_destroy(drbd_request_cache); | |
46 | + | |
47 | + /*if (drbd_ee_cache && kmem_cache_destroy(drbd_ee_cache)) | |
48 | +#endif | |
49 | printk(KERN_ERR DEVICE_NAME | |
50 | ": kmem_cache_destroy(drbd_ee_cache) FAILED\n"); | |
51 | if (drbd_request_cache && kmem_cache_destroy(drbd_request_cache)) | |
52 | printk(KERN_ERR DEVICE_NAME | |
53 | ": kmem_cache_destroy(drbd_request_cache) FAILED\n"); | |
54 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) | |
55 | + */ | |
56 | +#endif | |
57 | // FIXME what can we do if we fail to destroy them? | |
58 | ||
59 | drbd_request_mempool = NULL; | |
60 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_proc.c drbd-0.7.22.new/drbd/drbd_proc.c | |
61 | --- drbd-0.7.22.orig/drbd/drbd_proc.c 2006-12-21 01:16:11.000000000 +0100 | |
62 | +++ drbd-0.7.22.new/drbd/drbd_proc.c 2006-12-21 01:37:23.000000000 +0100 | |
63 | @@ -25,7 +25,12 @@ | |
64 | ||
65 | */ | |
66 | ||
67 | +#include <linux/version.h> | |
68 | + | |
69 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
70 | #include <linux/config.h> | |
71 | +#endif | |
72 | + | |
73 | #include <linux/module.h> | |
74 | ||
75 | #include <asm/uaccess.h> | |
76 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_receiver.c drbd-0.7.22.new/drbd/drbd_receiver.c | |
77 | --- drbd-0.7.22.orig/drbd/drbd_receiver.c 2006-12-21 01:16:11.000000000 +0100 | |
78 | +++ drbd-0.7.22.new/drbd/drbd_receiver.c 2006-12-21 01:37:54.000000000 +0100 | |
79 | @@ -24,8 +24,12 @@ | |
80 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
81 | */ | |
82 | ||
83 | +#include <linux/version.h> | |
84 | ||
85 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
86 | #include <linux/config.h> | |
87 | +#endif | |
88 | + | |
89 | #include <linux/module.h> | |
90 | ||
91 | #include <asm/uaccess.h> | |
92 | @@ -33,7 +37,6 @@ | |
93 | ||
94 | #include <linux/tcp.h> | |
95 | ||
96 | -#include <linux/version.h> | |
97 | #include <linux/fs.h> | |
98 | #include <linux/file.h> | |
99 | #include <linux/in.h> | |
100 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_req.c drbd-0.7.22.new/drbd/drbd_req.c | |
101 | --- drbd-0.7.22.orig/drbd/drbd_req.c 2006-12-21 01:16:11.000000000 +0100 | |
102 | +++ drbd-0.7.22.new/drbd/drbd_req.c 2006-12-21 01:38:18.000000000 +0100 | |
103 | @@ -25,7 +25,12 @@ | |
104 | ||
105 | */ | |
106 | ||
107 | +#include <linux/version.h> | |
108 | + | |
109 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
110 | #include <linux/config.h> | |
111 | +#endif | |
112 | + | |
113 | #include <linux/module.h> | |
114 | ||
115 | #include <linux/slab.h> | |
116 | diff -NurpP --minimal drbd-0.7.22.orig/drbd/drbd_worker.c drbd-0.7.22.new/drbd/drbd_worker.c | |
117 | --- drbd-0.7.22.orig/drbd/drbd_worker.c 2006-12-21 01:16:11.000000000 +0100 | |
118 | +++ drbd-0.7.22.new/drbd/drbd_worker.c 2006-12-21 01:38:48.000000000 +0100 | |
119 | @@ -25,9 +25,13 @@ | |
120 | ||
121 | */ | |
122 | ||
123 | +#include <linux/version.h> | |
124 | + | |
125 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) | |
126 | #include <linux/config.h> | |
127 | +#endif | |
128 | + | |
129 | #include <linux/module.h> | |
130 | -#include <linux/version.h> | |
131 | ||
132 | #include <linux/sched.h> | |
133 | #include <linux/smp_lock.h> |