From nobody Sat Sep 17 09:11:40 2022 X-Original-To: dev-commits-src-main@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 4MV4v055jXz4c41q; Sat, 17 Sep 2022 09:11:40 +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 4MV4v049hFz3h7j; Sat, 17 Sep 2022 09:11:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663405900; 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=qza4T68qRYr4YZFq4HIkOG2BJFNb63enFQyQZYSKdDs=; b=rkFsvFNmdkTyDoZOMdUMM7aig1POSIWodiRU0FVHd71br2KiZHG6fNMOrl/JHbs73hRXSu x62sGV0S+eYWd2jIoOLRNWF2YEhV9HgqM8nE6N7hJ2TIbEsqdVfEHn0YII54ewPwCpkKjs YOlMeS7DtMWKkf+Ei5X9XNcyLZNsiKOXpxyqPiLEZYeitwuRrOn3Nb33TqYkQ87BWvoFwi VoWHL9EK2EpJ/md0gfhf8Ubywx8LhhADzEuDZwKju+3q7wOYiaotcYgmV37hH8605kHW5R q7uKEXbY1lq/T3ObK11rMR2VYe/cquwbHKUK25JjmW7JMdfBOPxYjrdpoawJ5g== 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 4MV4v03FF2zftH; Sat, 17 Sep 2022 09:11:40 +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 28H9BeWj085249; Sat, 17 Sep 2022 09:11:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28H9BeJU085248; Sat, 17 Sep 2022 09:11:40 GMT (envelope-from git) Date: Sat, 17 Sep 2022 09:11:40 GMT Message-Id: <202209170911.28H9BeJU085248@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: 3df3d88cc5e2 - main - vfs: move cn_nameptr assignment out of namei_getpath List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 3df3d88cc5e291e106696c5a7734dc6640693a4a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663405900; 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=qza4T68qRYr4YZFq4HIkOG2BJFNb63enFQyQZYSKdDs=; b=Ajh/+6SKg3tzg/R/AHEpcAX+Ej5+UGe9Nqwhv7Fh1cUHKKjmrbNlOQdg4Dp6OisbkvF0hP FwzdGT2uCpI2PjqGJ4YuLwOBDOfU1qBtty0EwaWF7Z06TGMwPLlRfsdLjLkH8kR3oIhY+t Hot3j49ZCbFbixYm1qVxYE3/F791daQdMPSblW5Spio8VrJjAbXUe22uJidldkNa4Wa/TO R1VbI/ZM6FBrjEzdjo5TJKK6zOp6lzsjWa6iGAuUK8FkBATmWo62b+BRBriaH8Sr9CJUs5 pLw2PjjlU/iXz8gJdP7a0cHQK4pWfzsqu5pb+ry5l4HwGFa3zV7fhJNyTJcrKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663405900; a=rsa-sha256; cv=none; b=FSDXCBKkwXDEZSDNhfD+VUpz141jJ6ZgGNYxmNwMCumsJrTQgZJ9IGYP76tvimKdtlUE6s 44XwSblxgfHnX07JGierM83KHSb9n8RHZIPMNvX/jCEPlnSm4UW8VZOoj4Z/hjA9P7+u59 sNmqPFMfWvxELTlFhcjSNhDSUrzZvOZgwUOtXT3wPl8UQrCi35sW5LG4T1OAvLkfI+qaoP XFnhnpUV/S9swDqe0/lCE0e59ve6WhgA2mXclBAkCXxWSREQK2YZYWY6Ro/nmQov7svEhr gLTFSstviMl38lv55EOWRBDQDwP+tBSmS7fvPuKlCpjY0VPl/+Dz5L2y1pEL6g== 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=3df3d88cc5e291e106696c5a7734dc6640693a4a commit 3df3d88cc5e291e106696c5a7734dc6640693a4a Author: Mateusz Guzik AuthorDate: 2022-09-17 00:59:32 +0000 Commit: Mateusz Guzik CommitDate: 2022-09-17 09:08:34 +0000 vfs: move cn_nameptr assignment out of namei_getpath --- sys/kern/vfs_lookup.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 4281cd434fcf..79c7fd8365fa 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -420,11 +420,7 @@ namei_getpath(struct nameidata *ndp) &ndp->ni_pathlen); } - if (__predict_false(error != 0)) - return (error); - - cnp->cn_nameptr = cnp->cn_pnbuf; - return (0); + return (error); } static int @@ -622,6 +618,8 @@ namei(struct nameidata *ndp) return (error); } + cnp->cn_nameptr = cnp->cn_pnbuf; + #ifdef KTRACE if (KTRPOINT(td, KTR_NAMEI)) { ktrnamei(cnp->cn_pnbuf); @@ -654,6 +652,7 @@ namei(struct nameidata *ndp) namei_cleanup_cnp(cnp); return (error); } + cnp->cn_nameptr = cnp->cn_pnbuf; /* FALLTHROUGH */ case CACHE_FPL_STATUS_ABORTED: TAILQ_INIT(&ndp->ni_cap_tracker);