Rename cache_lookup_times() to cache_lookup() and retire the old API and
ABI stub for cache_lookup().
This commit is contained in:
parent
000d6ce285
commit
bf40d24a3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231088
@ -1042,7 +1042,7 @@ nfs_lookup(struct vop_lookup_args *ap)
|
|||||||
|
|
||||||
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0)
|
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0)
|
||||||
return (error);
|
return (error);
|
||||||
error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks);
|
error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks);
|
||||||
if (error > 0 && error != ENOENT)
|
if (error > 0 && error != ENOENT)
|
||||||
return (error);
|
return (error);
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
|
@ -853,7 +853,7 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
|
|||||||
if (error)
|
if (error)
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
|
||||||
error = cache_lookup(dvp, vpp, cnp);
|
error = cache_lookup(dvp, vpp, cnp, NULL, NULL);
|
||||||
NCPVNDEBUG("cache_lookup returned %d\n", error);
|
NCPVNDEBUG("cache_lookup returned %d\n", error);
|
||||||
if (error > 0)
|
if (error > 0)
|
||||||
return error;
|
return error;
|
||||||
|
@ -1131,7 +1131,7 @@ smbfs_lookup(ap)
|
|||||||
if (error)
|
if (error)
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
|
||||||
error = cache_lookup(dvp, vpp, cnp);
|
error = cache_lookup(dvp, vpp, cnp, NULL, NULL);
|
||||||
SMBVDEBUG("cache_lookup returned %d\n", error);
|
SMBVDEBUG("cache_lookup returned %d\n", error);
|
||||||
if (error > 0)
|
if (error > 0)
|
||||||
return error;
|
return error;
|
||||||
|
@ -456,7 +456,7 @@ cache_zap(ncp)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
cache_lookup_times(dvp, vpp, cnp, tsp, ticksp)
|
cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||||
struct vnode *dvp;
|
struct vnode *dvp;
|
||||||
struct vnode **vpp;
|
struct vnode **vpp;
|
||||||
struct componentname *cnp;
|
struct componentname *cnp;
|
||||||
@ -994,7 +994,7 @@ vfs_cache_lookup(ap)
|
|||||||
if (error)
|
if (error)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
error = cache_lookup(dvp, vpp, cnp);
|
error = cache_lookup(dvp, vpp, cnp, NULL, NULL);
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
return (VOP_CACHEDLOOKUP(dvp, vpp, cnp));
|
return (VOP_CACHEDLOOKUP(dvp, vpp, cnp));
|
||||||
if (error == -1)
|
if (error == -1)
|
||||||
@ -1374,12 +1374,9 @@ vn_commname(struct vnode *vp, char *buf, u_int buflen)
|
|||||||
|
|
||||||
/* ABI compat shims for old kernel modules. */
|
/* ABI compat shims for old kernel modules. */
|
||||||
#undef cache_enter
|
#undef cache_enter
|
||||||
#undef cache_lookup
|
|
||||||
|
|
||||||
void cache_enter(struct vnode *dvp, struct vnode *vp,
|
void cache_enter(struct vnode *dvp, struct vnode *vp,
|
||||||
struct componentname *cnp);
|
struct componentname *cnp);
|
||||||
int cache_lookup(struct vnode *dvp, struct vnode **vpp,
|
|
||||||
struct componentname *cnp);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
|
cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
|
||||||
@ -1388,13 +1385,6 @@ cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
|
|||||||
cache_enter_time(dvp, vp, cnp, NULL);
|
cache_enter_time(dvp, vp, cnp, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
|
|
||||||
{
|
|
||||||
|
|
||||||
return (cache_lookup_times(dvp, vpp, cnp, NULL, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function updates path string to vnode's full global path
|
* This function updates path string to vnode's full global path
|
||||||
* and checks the size of the new path string against the pathlen argument.
|
* and checks the size of the new path string against the pathlen argument.
|
||||||
|
@ -938,7 +938,7 @@ nfs_lookup(struct vop_lookup_args *ap)
|
|||||||
*vpp = NULLVP;
|
*vpp = NULLVP;
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks);
|
error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks);
|
||||||
if (error > 0 && error != ENOENT)
|
if (error > 0 && error != ENOENT)
|
||||||
return (error);
|
return (error);
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
|
@ -586,9 +586,7 @@ struct vnode;
|
|||||||
cache_enter_time(dvp, vp, cnp, NULL)
|
cache_enter_time(dvp, vp, cnp, NULL)
|
||||||
void cache_enter_time(struct vnode *dvp, struct vnode *vp,
|
void cache_enter_time(struct vnode *dvp, struct vnode *vp,
|
||||||
struct componentname *cnp, struct timespec *tsp);
|
struct componentname *cnp, struct timespec *tsp);
|
||||||
#define cache_lookup(dvp, vpp, cnp) \
|
int cache_lookup(struct vnode *dvp, struct vnode **vpp,
|
||||||
cache_lookup_times(dvp, vpp, cnp, NULL, NULL)
|
|
||||||
int cache_lookup_times(struct vnode *dvp, struct vnode **vpp,
|
|
||||||
struct componentname *cnp, struct timespec *tsp, int *ticksp);
|
struct componentname *cnp, struct timespec *tsp, int *ticksp);
|
||||||
void cache_purge(struct vnode *vp);
|
void cache_purge(struct vnode *vp);
|
||||||
void cache_purge_negative(struct vnode *vp);
|
void cache_purge_negative(struct vnode *vp);
|
||||||
|
Loading…
Reference in New Issue
Block a user