aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2023-07-08 19:45:46 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2023-07-08 19:45:46 +0000
commit70c00442d2bcf76fe123d84d39ea81346dfa2290 (patch)
treed95297b4dbf7b3e8d4e8eb56c7b55a4d17a9d4e9
parent7a70f17ac4bd64dc1a5020f963ba4380cf37b7e5 (diff)
downloadsrc-70c00442d2bcf76fe123d84d39ea81346dfa2290.tar.gz
src-70c00442d2bcf76fe123d84d39ea81346dfa2290.zip
vfs: clean up unused NDF_NO* macros
The manpage is touched up to not mention them, but still desperately needs help.
-rw-r--r--share/man/man9/namei.953
-rw-r--r--sys/sys/namei.h9
2 files changed, 2 insertions, 60 deletions
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index f98646725fb3..807c68bbae02 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -33,7 +33,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 23, 2015
+.Dd July 8, 2023
.Dt NAMEI 9
.Os
.Sh NAME
@@ -219,23 +219,10 @@ and we have not gone through any symlinks with an absolute path, and
the root otherwise.
.Pp
In this case, it is only used by
-.Fn lookup ,
+.Fn vfs_lookup ,
and should not be
considered valid after a call to
.Fn namei .
-If
-.Dv SAVESTART
-is set, this is set to the same as
-.Va ni_dvp ,
-with an extra
-.Xr vref 9 .
-To block
-.Fn NDFREE
-from releasing
-.Va ni_startdir ,
-the
-.Dv NDF_NO_STARTDIR_RELE
-can be set.
.It Va ni_dvp
Vnode pointer to directory of the object on which lookup is performed.
This is available on successful return if
@@ -246,13 +233,6 @@ is set.
It is locked if
.Dv LOCKPARENT
is set.
-Freeing this in
-.Fn NDFREE
-can be inhibited by
-.Dv NDF_NO_DVP_RELE , NDF_NO_DVP_PUT ,
-or
-.Dv NDF_NO_DVP_UNLOCK
-(with the obvious effects).
.It Va ni_vp
Vnode pointer to the resulting object,
.Dv NULL
@@ -264,13 +244,6 @@ If
.Dv LOCKLEAF
is set, it is also locked.
.Pp
-Freeing this in
-.Fn NDFREE
-can be inhibited by
-.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT ,
-or
-.Dv NDF_NO_VP_UNLOCK
-(with the obvious effects).
.It Va ni_cnd.cn_pnbuf
The pathname buffer contains the location of the file or directory
that will be used by the
@@ -279,28 +252,6 @@ operations.
It is managed by the
.Xr uma 9
zone allocation interface.
-If the
-.Dv SAVESTART
-or
-.Dv SAVENAME
-flag is set, then the pathname buffer is available
-after calling the
-.Fn namei
-function.
-.Pp
-To only deallocate resources used by the pathname buffer,
-.Va ni_cnd.cn_pnbuf ,
-then
-.Dv NDF_ONLY_PNBUF
-flag can be passed to the
-.Fn NDFREE
-function.
-To keep the pathname buffer intact,
-the
-.Dv NDF_NO_FREE_PNBUF
-flag can be passed to the
-.Fn NDFREE
-function.
.El
.Sh RETURN VALUES
If successful,
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 88ddb0f13458..547b337c7e32 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -268,15 +268,6 @@ do { \
(ndp)->ni_vp_seqc = SEQC_MOD; \
} while (0)
-#define NDF_NO_DVP_RELE 0x00000001
-#define NDF_NO_DVP_UNLOCK 0x00000002
-#define NDF_NO_DVP_PUT 0x00000003
-#define NDF_NO_VP_RELE 0x00000004
-#define NDF_NO_VP_UNLOCK 0x00000008
-#define NDF_NO_VP_PUT 0x0000000c
-#define NDF_NO_STARTDIR_RELE 0x00000010
-#define NDF_NO_FREE_PNBUF 0x00000020
-
#define NDFREE_IOCTLCAPS(ndp) do { \
struct nameidata *_ndp = (ndp); \
filecaps_free(&_ndp->ni_filecaps); \