Page MenuHomeFreeBSD

D43255.diff
No OneTemporary

D43255.diff

diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -3345,14 +3345,11 @@
void
vrefact(struct vnode *vp)
{
+ int old __diagused;
CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
-#ifdef INVARIANTS
- int old = atomic_fetchadd_int(&vp->v_usecount, 1);
+ old = refcount_acquire(&vp->v_usecount);
VNASSERT(old > 0, vp, ("%s: wrong use count %d", __func__, old));
-#else
- refcount_acquire(&vp->v_usecount);
-#endif
}
void

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 6:40 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14732283
Default Alt Text
D43255.diff (482 B)

Event Timeline