diff options
author | Richard Yao <[email protected]> | 2023-02-22 19:33:23 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-22 16:33:23 -0800 |
commit | c9e39da9a42a863141fd41c031ac7cee0253635b (patch) | |
tree | 3217de5f0b9a78c198de7429b4caebacdea4d87b /module/zfs/dsl_pool.c | |
parent | d9e64a4030d141580af2e8b75e8982637818145a (diff) |
Use rw_tryupgrade() in dmu_bonus_hold_by_dnode()
When dn->dn_bonus == NULL, dmu_bonus_hold_by_dnode() will unlock its
read lock on dn->dn_struct_rwlock and grab a write lock. This can be
micro-optimized by calling rw_tryupgrade().
Linux will not benefit from this since it does not support rwlock
upgrades, but FreeBSD will.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #14517
Diffstat (limited to 'module/zfs/dsl_pool.c')
0 files changed, 0 insertions, 0 deletions