aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-10-20 07:18:27 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-10-20 07:18:27 +0000
commit8ecd87a3e7f5503951d37eab034cb330a1c6ec86 (patch)
tree484e7ba6df66c04efe7fc9733e39bacdaad9c1da /sys
parent5011fb430a898f8ef4f53f4ae2034d029cd388c0 (diff)
downloadsrc-8ecd87a3e7f5503951d37eab034cb330a1c6ec86.tar.gz
src-8ecd87a3e7f5503951d37eab034cb330a1c6ec86.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c3
-rw-r--r--sys/fs/nullfs/null_vnops.c3
-rw-r--r--sys/kern/vfs_cache.c8
-rw-r--r--sys/kern/vfs_default.c3
-rw-r--r--sys/kern/vnode_if.src1
-rw-r--r--sys/sys/vnode.h3
6 files changed, 9 insertions, 12 deletions
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c
index 18c71511fccd..2b56deb6bf25 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c
@@ -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);
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index bb24ce60c177..d10337865744 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -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);
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 8d73a02b88ba..cf26c36a4081 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -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) {
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 63392a4083df..64de62cca79a 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -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);
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index ad678625c00e..8dd48de854d9 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -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;
};
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 6b2e54ae587f..5b330b508572 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -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);