From owner-svn-src-all@freebsd.org Tue Oct 20 07:18:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0961447F17; Tue, 20 Oct 2020 07:18:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFlN62qqWz3d5H; Tue, 20 Oct 2020 07:18:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6B3F10F75; Tue, 20 Oct 2020 07:18:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09K7ISTV074765; Tue, 20 Oct 2020 07:18:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09K7IRiP074758; Tue, 20 Oct 2020 07:18:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202010200718.09K7IRiP074758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 20 Oct 2020 07:18:27 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: contrib/openzfs/module/os/freebsd/zfs fs/nullfs kern sys X-SVN-Commit-Revision: 366869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2020 07:18:30 -0000 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);