mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #2330
This commit is contained in:
parent
485c581c41
commit
843b4aad50
@ -366,7 +366,7 @@ void
|
|||||||
rw_destroy(krwlock_t *rwlp)
|
rw_destroy(krwlock_t *rwlp)
|
||||||
{
|
{
|
||||||
ASSERT3U(rwlp->rw_magic, ==, RW_MAGIC);
|
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);
|
VERIFY3S(pthread_rwlock_destroy(&rwlp->rw_lock), ==, 0);
|
||||||
rwlp->rw_magic = 0;
|
rwlp->rw_magic = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user