Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137404494
D21358.id61252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21358.id61252.diff
View Options
Index: head/sys/kern/vfs_subr.c
===================================================================
--- head/sys/kern/vfs_subr.c
+++ head/sys/kern/vfs_subr.c
@@ -3018,6 +3018,19 @@
VI_UNLOCK(vp);
}
+void
+vholdnz(struct vnode *vp)
+{
+
+ CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
+#ifdef INVARIANTS
+ int old = atomic_fetchadd_int(&vp->v_holdcnt, 1);
+ VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__));
+#else
+ atomic_add_int(&vp->v_holdcnt, 1);
+#endif
+}
+
/*
* Drop the hold count of the vnode. If this is the last reference to
* the vnode we place it on the free list unless it has been vgone'd
Index: head/sys/sys/vnode.h
===================================================================
--- head/sys/sys/vnode.h
+++ head/sys/sys/vnode.h
@@ -657,6 +657,7 @@
#define vhold(vp) _vhold((vp), 0)
#define vholdl(vp) _vhold((vp), 1)
void _vhold(struct vnode *, bool);
+void vholdnz(struct vnode *);
void vinactive(struct vnode *, struct thread *);
int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
int vtruncbuf(struct vnode *vp, off_t length, int blksize);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 24, 3:27 AM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25984191
Default Alt Text
D21358.id61252.diff (1 KB)
Attached To
Mode
D21358: nullfs: reduce areas protected by vnode interlock
Attached
Detach File
Event Timeline
Log In to Comment