Remove atomics from zh_refcount

It is protected by z_hold_locks, so we do not need more serialization,
simple integer math should be fine.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by:  Alexander Motin <mav@FreeBSD.org>
Closes #14196
This commit is contained in:
Alexander Motin
2022-11-28 14:36:53 -05:00
committed by Brian Behlendorf
parent 82e3117095
commit 2098a00318
2 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -217,9 +217,9 @@ typedef struct znode {
typedef struct znode_hold {
uint64_t zh_obj; /* object id */
kmutex_t zh_lock; /* lock serializing object access */
avl_node_t zh_node; /* avl tree linkage */
zfs_refcount_t zh_refcount; /* active consumer reference count */
kmutex_t zh_lock; /* lock serializing object access */
int zh_refcount; /* active consumer reference count */
} znode_hold_t;
static inline uint64_t