From nobody Tue Jun 13 12:24:37 2023 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 4QgSRT5C7Nz4dBLK; Tue, 13 Jun 2023 12:24:37 +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 4QgSRT4n1sz3hlT; Tue, 13 Jun 2023 12:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686659077; 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=8hCxoC/Tu76u6j8fXP7tqD8UyF/1xCpT033UAdBQ1/A=; b=InoQ42u3lD4M+KFJ30J4tHkJQxUwWYeWkXLNe9FD378yPv2RXTUs4a6AN21kmex4ap1Oz5 TBFz8o0PxN34sXd2X3BiFeesIdovRKllmptFHgZocNfoZa4N+pPI7iVewEozLQIYJi7TvE 7PsohwSDOb/cpxuOiY9UVU9SCHTY8NtiE8zCUom0qW0joaPFdKaXZlP5OF81wxJEBDjWfm YIu6KQ6LR4mwTLBeJAgCluur5qMtCp0D5JXPOebAVYjfWAUevOMgjNuprp31AxcO8tK1ly I7FOL3Hvxd393yaz1k8nTmataOMLyEmGEQm5E6s9X4kZEX/j6WagWzNP2VnmOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686659077; 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=8hCxoC/Tu76u6j8fXP7tqD8UyF/1xCpT033UAdBQ1/A=; b=IgNVn1xA33AWADwGdlGeFkX3qL2RhcfjUz9N7CU7l63pZoLMJyXu5gBdbMIr028VOHv8sV /AoNJL3dQX3QhhHPneM6aQvr3DeSIvf3B6Ha3ritJvjSTV8VShXL87rMyCDVl2UHg45CUv dgHgSUGcReLRrl84q4WsNlktNj7FAKxCKjB+ZU6w5cHC5rQWG8c0MZDs3ec4vOoSSv4jRH WxePQgxCLG2jJBtXkfU5WoJAdebWC6ZbUkZfjdjMFkNjxXdN3AsDjw1wq6y1ycEZ07Vc2g 5kxbBE10jdOhhvj59adV5lB7HPul6kWZ4N2tL4/Awn6ZxPT/gzPRedw/KzJXFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686659077; a=rsa-sha256; cv=none; b=IY2v9xDbb3IWwyoK1onOw/YhOEuEEulH9rUoTj7fWL1TVRfPmg9rYJcQxIKAoqBh7WMGQ5 AjN08YV5lfMveSmb4M0yVVv1rSAzfbRm4pZ6mhLoO57eZXYtkHSgpiezX+6KMaM/USn/df jk9f+mrx4UoMN8d4/clqfqJ6PLLNCyjqJIConXK0z8u/nur1T2JvBf8A2/AsI/dU3wIiWt TGabscD6KIEuyHk1SNkD5lILowHlFQO1O2ui/GuFJp4/tEj/XjiX02uG0lB372Hl9VMnlI PEvnKt5IrU4aYkScSZSUe0WphQopyUplYWGgGyO5AwydU+hGcO1bv/b7wK9EJw== 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 4QgSRT3rdgzMmP; Tue, 13 Jun 2023 12:24:37 +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 35DCObDP026164; Tue, 13 Jun 2023 12:24:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35DCObWI026163; Tue, 13 Jun 2023 12:24:37 GMT (envelope-from git) Date: Tue, 13 Jun 2023 12:24:37 GMT Message-Id: <202306131224.35DCObWI026163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 861abdadf9db - main - namei: Add a comment explaining ISRESTARTED flag 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 861abdadf9db4dd7ba577537ba262fcda29869dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=861abdadf9db4dd7ba577537ba262fcda29869dd commit 861abdadf9db4dd7ba577537ba262fcda29869dd Author: Dmitry Chagin AuthorDate: 2023-06-13 12:22:09 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-13 12:22:09 +0000 namei: Add a comment explaining ISRESTARTED flag Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40494 --- sys/kern/vfs_lookup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index c813296b4931..20919fb38b4d 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -81,6 +81,11 @@ static void NDVALIDATE_impl(struct nameidata *, int); #define NDVALIDATE(ndp) #endif +/* + * Prepare namei() to restart. Reset components to its original state and set + * ISRESTARTED flag which signals the underlying lookup code to change the root + * from ABI root to actual root and prevents a further restarts. + */ #define NDRESTART(ndp) do { \ NDREINIT_DBG(ndp); \ ndp->ni_resflags = 0; \