diff options
author | Ryan Moeller <[email protected]> | 2020-06-13 13:58:10 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-13 10:58:10 -0700 |
commit | 499dccd69baa7e7fe479a54b964409bfb8b45fd2 (patch) | |
tree | 9b6c430e19f7ea859e4a590bbafd7cd1f4643be3 /include | |
parent | e08b993396692c227f576dd789280663103d3332 (diff) |
FreeBSD: Don't require zeroing new locks before init
This has not shown to be of use enough to justify the inconvenience.
Reviewed-by: Matt Macy <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Allan Jude <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10449
Diffstat (limited to 'include')
-rw-r--r-- | include/os/freebsd/spl/sys/mutex.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/os/freebsd/spl/sys/mutex.h b/include/os/freebsd/spl/sys/mutex.h index ef556872a..e757d12c1 100644 --- a/include/os/freebsd/spl/sys/mutex.h +++ b/include/os/freebsd/spl/sys/mutex.h @@ -39,7 +39,7 @@ typedef struct sx kmutex_t; #include <sys/sx.h> typedef enum { - MUTEX_DEFAULT = 6 /* kernel default mutex */ + MUTEX_DEFAULT = 0 /* kernel default mutex */ } kmutex_type_t; #define MUTEX_HELD(x) (mutex_owned(x)) @@ -53,9 +53,7 @@ typedef enum { #define mutex_init(lock, desc, type, arg) do { \ const char *_name; \ - ASSERT((type) == 0 || (type) == MUTEX_DEFAULT); \ - KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \ - LO_EXPECTED, ("lock %s already initialized", #lock)); \ + ASSERT((type) == MUTEX_DEFAULT); \ for (_name = #lock; *_name != '\0'; _name++) { \ if (*_name >= 'a' && *_name <= 'z') \ break; \ |