mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-10 20:36:21 +03:00
linux/rw_destroy: assert no holders before destroying
While rw_destroy() may do nothing on Linux, we still want to make sure that we don't have any holders outstanding like we do for mutexes. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17718
This commit is contained in:
parent
7939bad5e7
commit
fe2f7cf6d7
@ -130,7 +130,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
|||||||
/*
|
/*
|
||||||
* The Linux rwsem implementation does not require a matching destroy.
|
* The Linux rwsem implementation does not require a matching destroy.
|
||||||
*/
|
*/
|
||||||
#define rw_destroy(rwp) ((void) 0)
|
#define rw_destroy(rwp) ASSERT(!(RW_LOCK_HELD(rwp)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Upgrading a rwsem from a reader to a writer is not supported by the
|
* Upgrading a rwsem from a reader to a writer is not supported by the
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user