Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jun 2023 12:24:37 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 861abdadf9db - main - namei: Add a comment explaining ISRESTARTED flag
Message-ID:  <202306131224.35DCObWI026163@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=861abdadf9db4dd7ba577537ba262fcda29869dd

commit 861abdadf9db4dd7ba577537ba262fcda29869dd
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-06-13 12:22:09 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
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;						\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306131224.35DCObWI026163>