git: b4137c9ed158 - main - vfs: make NDVALIDATE private to vfs_lookup.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 12 Sep 2022 22:52:37 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b4137c9ed158cab16c55c0c14f5e6be7ae7df73a commit b4137c9ed158cab16c55c0c14f5e6be7ae7df73a Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-09-12 22:49:47 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-09-12 22:50:48 +0000 vfs: make NDVALIDATE private to vfs_lookup.c it is not used elsewhere. --- sys/kern/vfs_lookup.c | 8 +++++++- sys/sys/namei.h | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index cfaa12cfa8b9..20fb63dcee94 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -74,6 +74,12 @@ __FBSDID("$FreeBSD$"); #define NAMEI_DIAGNOSTIC 1 #undef NAMEI_DIAGNOSTIC +#ifdef INVARIANTS +static void NDVALIDATE(struct nameidata *); +#else +#define NDVALIDATE(ndp) do { } while (0) +#endif + SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long", "bool"); @@ -1643,7 +1649,7 @@ void * stricter over time. */ #define NDMODIFYINGFLAGS (LOCKLEAF | LOCKPARENT | WANTPARENT | SAVENAME | SAVESTART | HASBUF) -void +static void NDVALIDATE(struct nameidata *ndp) { struct componentname *cnp; diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 0b293d1d1abf..f6f6546342c0 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -298,10 +298,8 @@ void NDFREE(struct nameidata *, const u_int); #ifdef INVARIANTS void NDFREE_NOTHING(struct nameidata *); -void NDVALIDATE(struct nameidata *); #else #define NDFREE_NOTHING(ndp) do { } while (0) -#define NDVALIDATE(ndp) do { } while (0) #endif int namei(struct nameidata *ndp);