The cache_leaf_test() function seems to be unused, so remove it.

This commit is contained in:
Pawel Jakub Dawidek 2007-05-25 22:16:17 +00:00
parent faedb66c2a
commit 950afe9972
2 changed files with 0 additions and 32 deletions

View File

@ -292,37 +292,6 @@ cache_zap(ncp)
vdrop(vp);
}
/*
* cache_leaf_test()
*
* Test whether this (directory) vnode's namei cache entry contains
* subdirectories or not. Used to determine whether the directory is
* a leaf in the namei cache or not. Note: the directory may still
* contain files in the namei cache.
*
* Returns 0 if the directory is a leaf, -1 if it isn't.
*/
int
cache_leaf_test(struct vnode *vp)
{
struct namecache *ncpc;
int leaf;
leaf = 0;
CACHE_LOCK();
for (ncpc = LIST_FIRST(&vp->v_cache_src);
ncpc != NULL;
ncpc = LIST_NEXT(ncpc, nc_src)
) {
if (ncpc->nc_vp != NULL && ncpc->nc_vp->v_type == VDIR) {
leaf = -1;
break;
}
}
CACHE_UNLOCK();
return (leaf);
}
/*
* Lookup an entry in the cache
*

View File

@ -565,7 +565,6 @@ int cache_lookup(struct vnode *dvp, struct vnode **vpp,
struct componentname *cnp);
void cache_purge(struct vnode *vp);
void cache_purgevfs(struct mount *mp);
int cache_leaf_test(struct vnode *vp);
int change_dir(struct vnode *vp, struct thread *td);
int change_root(struct vnode *vp, struct thread *td);
void cvtstat(struct stat *st, struct ostat *ost);