FreeBSD/sys/fs/devfs/devfs_vfsops.c
/* Return locked reference to root.  */
Return locked reference to root.
Return locked reference to root .
static int
devfs_root(struct mount *mp, int flags, struct vnode **vpp)
{
	int error;
	struct vnode *vp;
	struct devfs_mount *dmp;
	dmp = VFSTODEVFS(mp);
	sx_xlock(&dmp->dm_lock);
	error = devfs_allocv(dmp->dm_rootdir, mp, LK_EXCLUSIVE, &vp);
	if (error)
		return (error);
	vp->v_vflag |= VV_ROOT;
	*vpp = vp;
	return (0);
}
static int devfs_root ( struct mount * mp , int flags , struct vnode * * vpp ) { int error ; struct vnode * vp ; struct devfs_mount * dmp ; dmp = VFSTODEVFS ( mp ) ; sx_xlock ( & dmp -> dm_lock ) ; error = devfs_allocv ( dmp -> dm_rootdir , mp , LK_EXCLUSIVE , & vp ) ; if ( error ) return ( error ) ; vp -> v_vflag |= VV_ROOT ; * vpp = vp ; return ( 0 ) ; }
Return locked reference to root.
Return locked reference to root .