svn commit: r364283 - in head/sys: kern sys

Mateusz Guzik mjg at FreeBSD.org
Sun Aug 16 18:51:13 UTC 2020


Author: mjg
Date: Sun Aug 16 18:51:12 2020
New Revision: 364283
URL: https://svnweb.freebsd.org/changeset/base/364283

Log:
  vfs: retire vrefl as a symbol
  
  vrefl calls vref and there is only one in-tree consumer.
  
  Keep it as a macro for assertion purposes.

Modified:
  head/sys/kern/vfs_subr.c
  head/sys/sys/vnode.h

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Sun Aug 16 18:45:31 2020	(r364282)
+++ head/sys/kern/vfs_subr.c	Sun Aug 16 18:51:12 2020	(r364283)
@@ -2929,15 +2929,6 @@ vref(struct vnode *vp)
 }
 
 void
-vrefl(struct vnode *vp)
-{
-
-	ASSERT_VI_LOCKED(vp, __func__);
-	CTR2(KTR_VFS, "%s: vp %p", __func__, vp);
-	vref(vp);
-}
-
-void
 vrefact(struct vnode *vp)
 {
 

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Sun Aug 16 18:45:31 2020	(r364282)
+++ head/sys/sys/vnode.h	Sun Aug 16 18:51:12 2020	(r364283)
@@ -965,7 +965,6 @@ do {									\
 void	vput(struct vnode *vp);
 void	vrele(struct vnode *vp);
 void	vref(struct vnode *vp);
-void	vrefl(struct vnode *vp);
 void	vrefact(struct vnode *vp);
 void 	v_addpollinfo(struct vnode *vp);
 static __inline int
@@ -974,6 +973,11 @@ vrefcnt(struct vnode *vp)
 
 	return (vp->v_usecount);
 }
+
+#define	vrefl(vp)	do {						\
+	ASSERT_VI_LOCKED(vp, __func__);					\
+	vref(vp);							\
+} while (0)
 
 int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
 void vnode_destroy_vobject(struct vnode *vp);


More information about the svn-src-head mailing list