diff options
author | Richard Yao <[email protected]> | 2014-04-29 20:47:47 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-09-23 10:34:46 -0700 |
commit | 843b4aad504b791eb1e8dfe6772a55d4da090b65 (patch) | |
tree | aed1dac623caf1fc7485712e13af39633c4774eb /lib/libzpool/kernel.c | |
parent | 485c581c41c4da15a17f045605ce5a7562b3b8a2 (diff) |
lib/libzpool/kernel.c: Assert no owners in rw_destroy()
This is intended to cause ztest to fail when rw_destroy() is called on a
rwlock that has owners.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2330
Diffstat (limited to 'lib/libzpool/kernel.c')
-rw-r--r-- | lib/libzpool/kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index a1bb973b1..03fbe3dd0 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -366,7 +366,7 @@ void rw_destroy(krwlock_t *rwlp) { ASSERT3U(rwlp->rw_magic, ==, RW_MAGIC); - + ASSERT(rwlp->rw_readers == 0 && rwlp->rw_wr_owner == RW_INIT); VERIFY3S(pthread_rwlock_destroy(&rwlp->rw_lock), ==, 0); rwlp->rw_magic = 0; } |