]> granicus.if.org Git - zfs/commitdiff
Add kpreempt_[dis|en]able macros in <sys/disp.h>
authorPrakash Surya <surya1@llnl.gov>
Fri, 24 Aug 2012 17:42:12 +0000 (10:42 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 24 Aug 2012 22:18:38 +0000 (15:18 -0700)
To support preempt enabled kernels in ZFS on Linux, there are a couple
places where the ZFS code needs to disable interrupts. This change adds
the Solaris preempt functions and maps them to the equivalent ZFS
functions, allowing the ZFS to make use of them.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #98

include/sys/disp.h

index a0a1b095720215e40ec7c648d65d86003cd5112a..2a4b4ded83b2a7beeeaa53795113f25effad1a15 100644 (file)
@@ -25,4 +25,9 @@
 #ifndef _SPL_DISP_H
 #define _SPL_DISP_H
 
+#include <linux/preempt.h>
+
+#define        kpreempt_disable()      preempt_disable()
+#define        kpreempt_enable()       preempt_enable()
+
 #endif /* SPL_DISP_H */