freebsd-dev/sys/cddl/contrib/opensolaris
Mateusz Guzik e3c3248cc7 vfs: implement usecount implying holdcnt
vnodes have 2 reference counts - holdcnt to keep the vnode itself from getting
freed and usecount to denote it is actively used.

Previously all operations bumping usecount would also bump holdcnt, which is
not necessary. We can detect if usecount is already > 1 (in which case holdcnt
is also > 1) and utilize it to avoid bumping holdcnt on our own. This saves
on atomic ops.

Reviewed by:	kib
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21471
2019-09-03 15:42:11 +00:00
..
common Revert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms 2019-08-15 15:27:58 +00:00
uts vfs: implement usecount implying holdcnt 2019-09-03 15:42:11 +00:00
OPENSOLARIS.LICENSE