Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jul 2023 19:46:33 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 70c00442d2bc - main - vfs: clean up unused NDF_NO* macros
Message-ID:  <202307081946.368JkXgv077355@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=70c00442d2bcf76fe123d84d39ea81346dfa2290

commit 70c00442d2bcf76fe123d84d39ea81346dfa2290
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-07-08 19:45:46 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-07-08 19:45:46 +0000

    vfs: clean up unused NDF_NO* macros
    
    The manpage is touched up to not mention them, but still desperately
    needs help.
---
 share/man/man9/namei.9 | 53 ++------------------------------------------------
 sys/sys/namei.h        |  9 ---------
 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);					\



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