vfs: drop spurious cred argument from VOP_VPTOCNP
This commit is contained in:
parent
5011fb430a
commit
8ecd87a3e7
@ -6507,8 +6507,7 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
|
||||
error = vget(covered_vp, LK_SHARED | LK_VNHELD, curthread);
|
||||
#endif
|
||||
if (error == 0) {
|
||||
error = VOP_VPTOCNP(covered_vp, ap->a_vpp, ap->a_cred,
|
||||
ap->a_buf, ap->a_buflen);
|
||||
error = VOP_VPTOCNP(covered_vp, ap->a_vpp, ap->a_buf, ap->a_buflen);
|
||||
vput(covered_vp);
|
||||
}
|
||||
vn_lock(vp, ltype | LK_RETRY);
|
||||
|
@ -909,7 +909,6 @@ null_vptocnp(struct vop_vptocnp_args *ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode **dvp = ap->a_vpp;
|
||||
struct vnode *lvp, *ldvp;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
struct mount *mp;
|
||||
int error, locked;
|
||||
|
||||
@ -921,7 +920,7 @@ null_vptocnp(struct vop_vptocnp_args *ap)
|
||||
VOP_UNLOCK(vp); /* vp is held by vn_vptocnp_locked that called us */
|
||||
ldvp = lvp;
|
||||
vref(lvp);
|
||||
error = vn_vptocnp(&ldvp, cred, ap->a_buf, ap->a_buflen);
|
||||
error = vn_vptocnp(&ldvp, ap->a_buf, ap->a_buflen);
|
||||
vdrop(lvp);
|
||||
if (error != 0) {
|
||||
vn_lock(vp, locked | LK_RETRY);
|
||||
|
@ -2811,7 +2811,7 @@ vn_dd_from_dst(struct vnode *vp)
|
||||
}
|
||||
|
||||
int
|
||||
vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf, size_t *buflen)
|
||||
vn_vptocnp(struct vnode **vp, char *buf, size_t *buflen)
|
||||
{
|
||||
struct vnode *dvp;
|
||||
struct namecache *ncp;
|
||||
@ -2853,7 +2853,7 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf, size_t *buflen)
|
||||
|
||||
mtx_unlock(vlp);
|
||||
vn_lock(*vp, LK_SHARED | LK_RETRY);
|
||||
error = VOP_VPTOCNP(*vp, &dvp, cred, buf, buflen);
|
||||
error = VOP_VPTOCNP(*vp, &dvp, buf, buflen);
|
||||
vput(*vp);
|
||||
if (error) {
|
||||
counter_u64_add(numfullpathfail2, 1);
|
||||
@ -2952,7 +2952,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf,
|
||||
error, vp, NULL);
|
||||
break;
|
||||
}
|
||||
error = vn_vptocnp(&vp, curthread->td_ucred, buf, &buflen);
|
||||
error = vn_vptocnp(&vp, buf, &buflen);
|
||||
if (error)
|
||||
break;
|
||||
if (buflen == 0) {
|
||||
@ -3151,7 +3151,7 @@ vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf,
|
||||
if (vp->v_type != VDIR) {
|
||||
*buflen -= 1;
|
||||
buf[*buflen] = '\0';
|
||||
error = vn_vptocnp(&vp, curthread->td_ucred, buf, buflen);
|
||||
error = vn_vptocnp(&vp, buf, buflen);
|
||||
if (error)
|
||||
return (error);
|
||||
if (*buflen == 0) {
|
||||
|
@ -819,7 +819,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap)
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode **dvp = ap->a_vpp;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
struct ucred *cred;
|
||||
char *buf = ap->a_buf;
|
||||
size_t *buflen = ap->a_buflen;
|
||||
char *dirbuf, *cpos;
|
||||
@ -836,6 +836,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap)
|
||||
error = 0;
|
||||
covered = 0;
|
||||
td = curthread;
|
||||
cred = td->td_ucred;
|
||||
|
||||
if (vp->v_type != VDIR)
|
||||
return (ENOENT);
|
||||
|
@ -682,7 +682,6 @@ vop_vptofh {
|
||||
vop_vptocnp {
|
||||
IN struct vnode *vp;
|
||||
OUT struct vnode **vpp;
|
||||
IN struct ucred *cred;
|
||||
INOUT char *buf;
|
||||
INOUT size_t *buflen;
|
||||
};
|
||||
|
@ -657,8 +657,7 @@ int insmntque1(struct vnode *vp, struct mount *mp,
|
||||
int insmntque(struct vnode *vp, struct mount *mp);
|
||||
u_quad_t init_va_filerev(void);
|
||||
int speedup_syncer(void);
|
||||
int vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf,
|
||||
size_t *buflen);
|
||||
int vn_vptocnp(struct vnode **vp, char *buf, size_t *buflen);
|
||||
int vn_getcwd(char *buf, char **retbuf, size_t *buflen);
|
||||
int vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf);
|
||||
int vn_fullpath_global(struct vnode *vp, char **retbuf, char **freebuf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user