sys/kern/vfs_subr.c
/*
 * List all of the locked vnodes in the system.
 * Called when debugging the kernel.
 */
List all of the locked vnodes in the system.
Called when debugging the kernel.
List all of the locked vnodes in the system . Called when debugging the kernel .
void
printlockedvnodes()
{
	struct proc *p = curproc;	
	struct mount *mp, *nmp;
	struct vnode *vp;
	printf("Locked vnodes\n");
	simple_lock(&mountlist_slock);
	for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) {
		if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock, p)) {
			nmp = mp->mnt_list.cqe_next;
			continue;
		}
		for (vp = mp->mnt_vnodelist.lh_first;
		     vp != NULL;
		     vp = vp->v_mntvnodes.le_next) {
			if (VOP_ISLOCKED(vp))
				vprint((char *)0, vp);
		}
		simple_lock(&mountlist_slock);
		nmp = mp->mnt_list.cqe_next;
		vfs_unbusy(mp, p);
	}
	simple_unlock(&mountlist_slock);
}
void printlockedvnodes ( ) { struct proc * p = curproc ; struct mount * mp , * nmp ; struct vnode * vp ; printf ( " \n " ) ; simple_lock ( & mountlist_slock ) ; for ( mp = mountlist . cqh_first ; mp != ( void * ) & mountlist ; mp = nmp ) { if ( vfs_busy ( mp , LK_NOWAIT , & mountlist_slock , p ) ) { nmp = mp -> mnt_list . cqe_next ; continue ; } for ( vp = mp -> mnt_vnodelist . lh_first ; vp != NULL ; vp = vp -> v_mntvnodes . le_next ) { if ( VOP_ISLOCKED ( vp ) ) vprint ( ( char * ) 0 , vp ) ; } simple_lock ( & mountlist_slock ) ; nmp = mp -> mnt_list . cqe_next ; vfs_unbusy ( mp , p ) ; } simple_unlock ( & mountlist_slock ) ; }
List all of the locked vnodes in the system.
List all of the locked vnodes in the system .
/* XXX */