]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Add lock types RW_NOLOCKDEP and MUTEX_NOLOCKDEP
authorOlaf Faaland <faaland1@llnl.gov>
Fri, 6 Nov 2015 17:38:27 +0000 (09:38 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 22 Dec 2015 18:20:29 +0000 (10:20 -0800)
Both lock types were introduced in SPL to allow some locks to be
taken/released with linux lockdep turned off.  See SPL commit for
details.

Add the new lock types to zfs_context.h to allow user space compilation.

Depends on SPL commit 692ae8d
SPL pull request refs/pull/480/head

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3895

include/sys/zfs_context.h

index 4f7e3287f3da3fea051acdab27943771f6b1e28c..2a749d840b80fc166cf216c43994a2b09e149e3b 100644 (file)
@@ -274,6 +274,7 @@ typedef struct kmutex {
 } kmutex_t;
 
 #define        MUTEX_DEFAULT   0
+#define        MUTEX_NOLOCKDEP MUTEX_DEFAULT
 #define        MUTEX_HELD(m)   ((m)->m_owner == curthread)
 #define        MUTEX_NOT_HELD(m) (!MUTEX_HELD(m))
 
@@ -305,6 +306,7 @@ typedef int krw_t;
 #define        RW_READER       0
 #define        RW_WRITER       1
 #define        RW_DEFAULT      RW_READER
+#define        RW_NOLOCKDEP    RW_READER
 
 #define        RW_READ_HELD(x)         ((x)->rw_readers > 0)
 #define        RW_WRITE_HELD(x)        ((x)->rw_wr_owner == curthread)