FreeBSD/sys/kern/vfs_cache.c
/*
 * Flush all entries referencing a particular filesystem.
 */
Flush all entries referencing a particular filesystem.
Flush all entries referencing a particular filesystem .
void
cache_purgevfs(struct mount *mp)
{
	struct nchashhead *ncpp;
	struct namecache *ncp, *nnp;
	SDT_PROBE1(vfs, namecache, purgevfs, done, mp);
	CACHE_WLOCK();
	for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
		LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
			if (ncp->nc_dvp->v_mount == mp)
				cache_zap(ncp);
		}
	}
	CACHE_WUNLOCK();
}
void cache_purgevfs ( struct mount * mp ) { struct nchashhead * ncpp ; struct namecache * ncp , * nnp ; SDT_PROBE1 ( vfs , namecache , purgevfs , done , mp ) ; CACHE_WLOCK ( ) ; for ( ncpp = & nchashtbl [ nchash ] ; ncpp >= nchashtbl ; ncpp -- ) { LIST_FOREACH_SAFE ( ncp , ncpp , nc_hash , nnp ) { if ( ncp -> nc_dvp -> v_mount == mp ) cache_zap ( ncp ) ; } } CACHE_WUNLOCK ( ) ; }
Flush all entries referencing a particular filesystem.
Flush all entries referencing a particular filesystem .
/* Scan hash tables for applicable entries */