the vnode interlock relocking for vchr in vrele may seem problematic, but it almost never happens in practice. I take it for readability.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/kern/vfs_subr.c | ||
---|---|---|
2802–2804 ↗ | (On Diff #67846) | The caller is required to hold the interlock when transitioning a VCHR usecount to zero. This prevents a race with devfs_reclaim_vchr() that would leak a si_usecount reference. The vnode lock will also prevent this race if it is held while dropping the last ref. |
2810 ↗ | (On Diff #67846) | vrele() |
2812 ↗ | (On Diff #67846) | v_usecount == 0, does not decrement si_usecount |
2817 ↗ | (On Diff #67846) | v_decr_devcount() |