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 Skipped - Unit
Tests Skipped - Build Status
Buildable 29303
Event Timeline
sys/kern/vfs_subr.c | ||
---|---|---|
2802–2804 | 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 | vrele() | |
2812 | v_usecount == 0, does not decrement si_usecount | |
2817 | v_decr_devcount() |