git: ccd44c5e4881 - main - vn_open_cred(): rename VN_OPEN_NAMECACHE flag to VN_OPEN_COREDUMP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Oct 2026 17:01:11 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=ccd44c5e4881ece004fa23d3b479d4ee57b2a58e
commit ccd44c5e4881ece004fa23d3b479d4ee57b2a58e
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-03 23:59:30 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-07 17:00:53 +0000
vn_open_cred(): rename VN_OPEN_NAMECACHE flag to VN_OPEN_COREDUMP
The flag only use is for special handling of core dump vnodes.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D60283
---
sys/kern/coredump_vnode.c | 4 ++--
sys/kern/vfs_vnops.c | 2 +-
sys/sys/vnode.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/coredump_vnode.c b/sys/kern/coredump_vnode.c
index 8b857e9aa4a2..0f2da8599a4c 100644
--- a/sys/kern/coredump_vnode.c
+++ b/sys/kern/coredump_vnode.c
@@ -216,7 +216,7 @@ corefile_open_last(struct thread *td, char *name, int indexpos,
nextvp = oldvp = NULL;
cmode = S_IRUSR | S_IWUSR;
- oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE |
+ oflags = VN_OPEN_NOAUDIT | VN_OPEN_COREDUMP |
(capmode_coredump ? VN_OPEN_NOCAPCHECK : 0);
for (i = 0; i < ncores; i++) {
@@ -396,7 +396,7 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td,
}
} else {
cmode = S_IRUSR | S_IWUSR;
- oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE |
+ oflags = VN_OPEN_NOAUDIT | VN_OPEN_COREDUMP |
(capmode_coredump ? VN_OPEN_NOCAPCHECK : 0);
flags = O_CREAT | FWRITE | O_NOFOLLOW;
if ((td->td_proc->p_flag & P_SUGID) != 0)
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 7cb2b76d6cf2..7b86bb2bdb3f 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -309,7 +309,7 @@ restart:
NDREINIT(ndp);
goto restart;
}
- if ((vn_open_flags & VN_OPEN_NAMECACHE) != 0 ||
+ if ((vn_open_flags & VN_OPEN_COREDUMP) != 0 ||
(vn_irflag_read(ndp->ni_dvp) & VIRF_INOTIFY) != 0)
ndp->ni_cnd.cn_flags |= MAKEENTRY;
#ifdef MAC
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 2fa1a51ce1cc..39b8c4fb1952 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -624,7 +624,7 @@ typedef void vop_getpages_iodone_t(void *, vm_page_t *, int, int);
/* vn_open_flags */
#define VN_OPEN_NOAUDIT 0x00000001
#define VN_OPEN_NOCAPCHECK 0x00000002
-#define VN_OPEN_NAMECACHE 0x00000004
+#define VN_OPEN_COREDUMP 0x00000004
#define VN_OPEN_INVFS 0x00000008
#define VN_OPEN_WANTIOCTLCAPS 0x00000010