aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-06-13 12:22:09 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-06-13 12:22:09 +0000
commit861abdadf9db4dd7ba577537ba262fcda29869dd (patch)
treefb14955dba77ab47fa43b27d9dc6d6d27457df2c /sys
parent6a9cfebaf1cfee2ff39fb5ea1e7077aab423c3f6 (diff)
downloadsrc-861abdadf9db4dd7ba577537ba262fcda29869dd.tar.gz
src-861abdadf9db4dd7ba577537ba262fcda29869dd.zip
namei: Add a comment explaining ISRESTARTED flag
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40494
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_lookup.c5
1 files changed, 5 insertions, 0 deletions
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; \