diff options
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzpool/common/kernel.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzpool/common/kernel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c index 6365c6c..e0f6422 100644 --- a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c +++ b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c @@ -174,11 +174,13 @@ rw_init(krwlock_t *rwlp, char *name, int type, void *arg) rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL); rwlp->rw_owner = NULL; rwlp->initialized = B_TRUE; + rwlp->rw_count = 0; } void rw_destroy(krwlock_t *rwlp) { + ASSERT(rwlp->rw_count == 0); rwlock_destroy(&rwlp->rw_lock); rwlp->rw_owner = (void *)-1UL; rwlp->initialized = B_FALSE; |