mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-14 17:22:05 +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
0df91abe82
commit
dc53e5c484
@ -130,7 +130,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
/*
|
||||
* 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user