From nobody Sun Mar 13 14:46:20 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1EE891A1B4E7; Sun, 13 Mar 2022 14:46:21 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KGjCx0KX2z3KL5; Sun, 13 Mar 2022 14:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647182781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3BEVdOv37yUvnvwho0Vs/tVh0XUFKtEgUDwZNffwXY=; b=ZlXu1/6qKH++LVr/hzGnSQS5hAwVI3WmfcoFfJEEafDH3CF4zLtl0vph4b3hhsZu1csd0d Z6j+AdPJWkvMrm4AF02OT2N/4m1cTFIW6tmEUU4dao8LHrH5sKrSdilurDBecBwONNVLlY LzhNnMRXCNU9ujd9K/TVrqEYyCnTme2ABVab0dkjGT/S33JXguiCEMs2nPpR5As49UbFXD z2sNnQyHCoNmwltDjiAVnONNegV8D2L9tk33aHpl7g4ENFO60kdb0yJ1YC2NeJwDvuU2tG fB+UVFAMYHO2PEDgrOSAy4oUvYOYRBcDSa/gdgYh0bMRq1IgGWrQocw7BrjZlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB32D1B074; Sun, 13 Mar 2022 14:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22DEkKPK015575; Sun, 13 Mar 2022 14:46:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22DEkKvu015574; Sun, 13 Mar 2022 14:46:20 GMT (envelope-from git) Date: Sun, 13 Mar 2022 14:46:20 GMT Message-Id: <202203131446.22DEkKvu015574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 0134bbe56fbb - main - vfs: prefix lookup and relookup with vfs_ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0134bbe56fbbf3a53a6eeefeb21c66a998654a29 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647182781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3BEVdOv37yUvnvwho0Vs/tVh0XUFKtEgUDwZNffwXY=; b=bSMOpfUuP2o8sdFdwPNMF6P/usQjcx805GNz6XfK3N0F8Oe4f1VR6CXrtQ3aKq/IFOf2bG k4SL3oo9l2En4vkPdkco0G7NtKuO2ueguQ1DfzJ8QrTaSgP196B4ikQcvUpP6ytbfF6eGp di0rapo3HwZfrKyfa5GAfEtgwSRRTkvMB4VppSjidLJfwFyoTTf+aI0Et8E2jtSN+AzoXj PMhYECzY/oKMN8M0/6UBEgub2Y/h0Y33nnrYd+AygZoedi/vMCYLNnPmXSZyHFHxG5yGP5 RhogrbyKxymx2zL/UtZEjXGze3FjKI5WnEdz4Ltxj6BYv1wz4uVwf8Ap3ACgmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647182781; a=rsa-sha256; cv=none; b=RdMzZAr2bU27ZzEL352KI2Y/pjIUYnZOXZuxbou8D8UX71PIS03CxHvMLxeDmUN0AexQ59 mDPKdrPuOIprn/mgxEqZZCDIy9nK55+weCVa/8D6Uh8gM/g2zXaMbp3aZ99z5/mbwyeQU2 6nUStZKl32pJsuWhUDpyx3ei+I31ERnseo8vSWwacFFasMys2TQvgxoj1bY5rqaQAaLndu uPg78zvTMFEp/+a9kZXqTuXcYcAEPjkmUthG/rbb0ZCCJgP9iOFFdm+KeH5I/DAl8Apq5U ubnYXIOH3RnetQp/aWOIJWPaFdVwCVBXUpw8DYL1J2xIMIC/2+KjfaVCBUbLOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0134bbe56fbbf3a53a6eeefeb21c66a998654a29 commit 0134bbe56fbbf3a53a6eeefeb21c66a998654a29 Author: Mateusz Guzik AuthorDate: 2022-03-13 14:44:39 +0000 Commit: Mateusz Guzik CommitDate: 2022-03-13 14:44:39 +0000 vfs: prefix lookup and relookup with vfs_ Reviewed by: imp, mckusick Differential Revision: https://reviews.freebsd.org/D34530 --- sys/fs/ext2fs/ext2_vnops.c | 4 ++-- sys/fs/nfsserver/nfs_nfsdport.c | 2 +- sys/fs/unionfs/union_subr.c | 4 ++-- sys/kern/vfs_lookup.c | 6 +++--- sys/sys/namei.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index a00b2121308a..9843fc16e6b2 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -919,7 +919,7 @@ abortit: if (error) goto out; VREF(tdvp); - error = relookup(tdvp, &tvp, tcnp); + error = vfs_relookup(tdvp, &tvp, tcnp); if (error) goto out; vrele(tdvp); @@ -1045,7 +1045,7 @@ abortit: fcnp->cn_flags &= ~MODMASK; fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; VREF(fdvp); - error = relookup(fdvp, &fvp, fcnp); + error = vfs_relookup(fdvp, &fvp, fcnp); if (error == 0) vrele(fdvp); if (fvp != NULL) { diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 03f299ff0a10..5dbe20f7a66a 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -677,7 +677,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, * In either case ni_startdir will be dereferenced and NULLed * out. */ - error = lookup(ndp); + error = vfs_lookup(ndp); if (error) break; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 08202501fe02..a3a5feef3291 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -681,7 +681,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, vref(dvp); VOP_UNLOCK(dvp); - if ((error = relookup(dvp, vpp, cn))) { + if ((error = vfs_relookup(dvp, vpp, cn))) { vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } else vrele(dvp); @@ -1028,7 +1028,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, NDPREINIT(&nd); vref(udvp); - if ((error = relookup(udvp, &vp, &nd.ni_cnd)) != 0) + if ((error = vfs_relookup(udvp, &vp, &nd.ni_cnd)) != 0) goto unionfs_vn_create_on_upper_free_out2; vrele(udvp); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index e91a43572cbd..cb0a9c2a216c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -655,7 +655,7 @@ namei(struct nameidata *ndp) */ for (;;) { ndp->ni_startdir = dp; - error = lookup(ndp); + error = vfs_lookup(ndp); if (error != 0) goto out; @@ -843,7 +843,7 @@ _Static_assert(MAXNAMLEN == NAME_MAX, * if WANTPARENT set, return unlocked parent in ni_dvp */ int -lookup(struct nameidata *ndp) +vfs_lookup(struct nameidata *ndp) { char *cp; /* pointer into pathname argument */ char *prev_ni_next; /* saved ndp->ni_next */ @@ -1388,7 +1388,7 @@ bad_eexist: * Used by lookup to re-acquire things. */ int -relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) +vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { struct vnode *dp = NULL; /* the directory we are searching */ int rdonly; /* lookup read-only flag bit */ diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 965a2b757f49..23718dde5bed 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -305,8 +305,8 @@ void NDVALIDATE(struct nameidata *); #endif int namei(struct nameidata *ndp); -int lookup(struct nameidata *ndp); -int relookup(struct vnode *dvp, struct vnode **vpp, +int vfs_lookup(struct nameidata *ndp); +int vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp); #endif