From nobody Thu Nov 28 13:30:14 2024 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 4Xzcck2tLWz5fjTk; Thu, 28 Nov 2024 13:30:14 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzcck23STz4mWh; Thu, 28 Nov 2024 13:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800614; 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=5n71S7uOzmbAiGgQOQFXAJtnB5Af2X5UfzvBs5uLoj0=; b=RRzEnEa2hd7sUVZkGlVgEkTo5somvgZ7wZ1mPiXhaYxWB3oz+WzUA0fW/JrwA6PQZSWyKr JpPHlrP60fGfKb0ssZqD+/XIqhZ+sD5NMY1IJVyh+E1Q/GXjcRyeosaTNPDiUkzyNgM8zx 1mmFtQHY2xZzqFdYDTawrHmNUbvt22apoJHLDfeUU7ewEF0M8tKe0jN/BxZLjBqoi7yFzW vXZ7499UHffU2D5DKRqjS4tKLVs0gpU09laAA7XmZ0tYnkDiLgNycb+/t9EEAQSfSOa8Nn ayDptfPF2cNWOuIrXkGkXAu6B7887lDbVWCm1ZNVah+PQhFf8cVxtz+C64gVXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800614; 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=5n71S7uOzmbAiGgQOQFXAJtnB5Af2X5UfzvBs5uLoj0=; b=PZ3kcL5GyprskDdngU0GgZU9miPimpbaiTjZ2NXWajzH2nXa0/oALTslFXEvTKroqeeG5X 8uNkj1CBD0NJR5HKgN6CcR0Mfhxyajy5eKgvx9xvMXWJhJmEgD0pLq9Ctp7mFvzzhKFP1Z YOXDWS05GfQEB7YuNFG5XvEOm1drd74dwqdJZscMRuwN7NyIwcmcqQ7FS4Pb1lW8Ll8+fn yYPwOdyDDst0ykQYtx6ncR1RusApr0rXaUtzU/tcOoK6OIrpITLONYLuIioJk5s8Z8jGi7 ZrOLZXd19Do1duDD5b5hT80230A4fKUf3VudiBCMDLk9RcsBAzMGxL5Je0qeYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800614; a=rsa-sha256; cv=none; b=MJlRwock36o4BJQjcecebredllHamvnxTnBpN6nEDRlh5NU8zfAMntHJwt3/DxACiKs116 orbxgoppiNZyn0R0P8O+ssTJuCA631mEmoewt32XVjsYX13M/F/RKPg5cSBdpq4LEukDdS r6wg7VLx73pEetW163509lTOs0AEQk4YxhAZviWjpTdbfjh1FC6uSehH4qvToDvOkG8Xam 6c9A/UNpacxnGc+yrfBk2y9NdQvHYtPubd6IQYfZWuZyzJ6piIglO0WHQlex0KTcYhlAxD WWNKzl2/eLbmJKhuJjjjFPDx3BJWcdN/EfKhH0jtjyzObgvtAlB/zgNS3n2dOA== 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 4Xzcck1Qw5zh85; Thu, 28 Nov 2024 13:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUE9M012315; Thu, 28 Nov 2024 13:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUEPB012310; Thu, 28 Nov 2024 13:30:14 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:14 GMT Message-Id: <202411281330.4ASDUEPB012310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ab6a6a092834 - stable/14 - kern___realpathat(): style 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 commit ab6a6a092834e7b3a74e1b05d3006ca2d91a7188 Author: Konstantin Belousov AuthorDate: 2024-11-25 12:41:17 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 kern___realpathat(): style (cherry picked from commit 31784ee1e37dc0337637493721c4c9b98547089b) --- sys/kern/vfs_cache.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 9ec0970628b4..d48c1c0be80a 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3178,6 +3178,8 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, if (nd.ni_vp->v_type == VREG && nd.ni_dvp->v_type != VDIR && (nd.ni_vp->v_vflag & VV_ROOT) != 0) { + struct vnode *covered_vp; + /* * This happens if vp is a file mount. The call to * vn_fullpath_hardlink can panic if path resolution can't be @@ -3187,7 +3189,6 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, * this should have a unique global path since we disallow * mounting on linked files. */ - struct vnode *covered_vp; error = vn_lock(nd.ni_vp, LK_SHARED); if (error != 0) goto out; @@ -3197,8 +3198,9 @@ kern___realpathat(struct thread *td, int fd, const char *path, char *buf, error = vn_fullpath(covered_vp, &retbuf, &freebuf); vrele(covered_vp); } else { - error = vn_fullpath_hardlink(nd.ni_vp, nd.ni_dvp, nd.ni_cnd.cn_nameptr, - nd.ni_cnd.cn_namelen, &retbuf, &freebuf, &size); + error = vn_fullpath_hardlink(nd.ni_vp, nd.ni_dvp, + nd.ni_cnd.cn_nameptr, nd.ni_cnd.cn_namelen, &retbuf, + &freebuf, &size); } if (error == 0) { error = copyout(retbuf, buf, size);