git: 765b8ef6991c - stable/14 - mac: Remove uses of DEBUG_VFS_LOCKS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 25 Aug 2025 15:22:53 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=765b8ef6991c317b4172f3ebc2db21beb8168627
commit 765b8ef6991c317b4172f3ebc2db21beb8168627
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-24 15:30:15 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-08-25 13:57:57 +0000
mac: Remove uses of DEBUG_VFS_LOCKS
We can assert that a vnode lock is held whenever INVARIANTS is
configured.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51698
(cherry picked from commit 2daaf63d538b76b6c135c273cc17c56fac5a7535)
---
sys/security/mac/mac_framework.h | 2 +-
sys/security/mac/mac_vfs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h
index 99bb11be8796..831046e808e9 100644
--- a/sys/security/mac/mac_framework.h
+++ b/sys/security/mac/mac_framework.h
@@ -488,7 +488,7 @@ void mac_sysvshm_init(struct shmid_kernel *);
void mac_thread_userret(struct thread *td);
-#if defined(MAC) && defined(DEBUG_VFS_LOCKS)
+#if defined(MAC) && defined(INVARIANTS)
void mac_vnode_assert_locked(struct vnode *vp, const char *func);
#else
#define mac_vnode_assert_locked(vp, func) do { } while (0)
diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c
index a50c6f0c8f26..dc2bfa7c643b 100644
--- a/sys/security/mac/mac_vfs.c
+++ b/sys/security/mac/mac_vfs.c
@@ -1078,7 +1078,7 @@ vn_setlabel(struct vnode *vp, struct label *intlabel, struct ucred *cred)
return (0);
}
-#ifdef DEBUG_VFS_LOCKS
+#ifdef INVARIANTS
void
mac_vnode_assert_locked(struct vnode *vp, const char *func)
{