]> git.pld-linux.org Git - packages/spl.git/blame - linux-3.17.patch
- fix building with linux 3.17
[packages/spl.git] / linux-3.17.patch
CommitLineData
74742be2
JR
1--- spl-0.6.3/module/spl/spl-kmem.c~ 2014-06-12 22:59:01.000000000 +0200
2+++ spl-0.6.3/module/spl/spl-kmem.c 2014-11-09 16:42:21.157985621 +0100
3@@ -26,6 +26,7 @@
4
5 #include <sys/kmem.h>
6 #include <spl-debug.h>
7+#include <linux/version.h>
8
9 #ifdef SS_DEBUG_SUBSYS
10 #undef SS_DEBUG_SUBSYS
11@@ -1889,12 +1889,14 @@
12 return !test_bit(KMC_BIT_GROWING, &skc->skc_flags);
13 }
14
15+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) )
16 static int
17 spl_cache_reclaim_wait(void *word)
18 {
19 schedule();
20 return 0;
21 }
22+#endif
23
24 /*
25 * No available objects on any slabs, create a new slab. Note that this
26@@ -1917,8 +1919,13 @@
27 * then return so the local magazine can be rechecked for new objects.
28 */
29 if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) {
30+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) )
31 rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
32 spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE);
33+#else
34+ rc = wait_on_bit_io(&skc->skc_flags, KMC_BIT_REAPING,
35+ TASK_UNINTERRUPTIBLE);
36+#endif
37 SRETURN(rc ? rc : -EAGAIN);
38 }
39
This page took 0.474928 seconds and 4 git commands to generate.