Date: Tue, 20 Oct 2020 07:18:27 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366869 - in head/sys: contrib/openzfs/module/os/freebsd/zfs fs/nullfs kern sys Message-ID: <202010200718.09K7IRiP074758@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Oct 20 07:18:27 2020 New Revision: 366869 URL: https://svnweb.freebsd.org/changeset/base/366869 Log: vfs: drop spurious cred argument from VOP_VPTOCNP Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c head/sys/fs/nullfs/null_vnops.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_default.c head/sys/kern/vnode_if.src head/sys/sys/vnode.h Modified: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops.c Tue Oct 20 07:18:27 2020 (r366869) @@ -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); Modified: head/sys/fs/nullfs/null_vnops.c ============================================================================== --- head/sys/fs/nullfs/null_vnops.c Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/fs/nullfs/null_vnops.c Tue Oct 20 07:18:27 2020 (r366869) @@ -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); Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/kern/vfs_cache.c Tue Oct 20 07:18:27 2020 (r366869) @@ -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 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, 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, 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) { Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/kern/vfs_default.c Tue Oct 20 07:18:27 2020 (r366869) @@ -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); Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/kern/vnode_if.src Tue Oct 20 07:18:27 2020 (r366869) @@ -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; }; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Tue Oct 20 02:32:40 2020 (r366868) +++ head/sys/sys/vnode.h Tue Oct 20 07:18:27 2020 (r366869) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010200718.09K7IRiP074758>