git: 2daaf63d538b - main - mac: Remove uses of DEBUG_VFS_LOCKS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 03 Aug 2025 22:11:53 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=2daaf63d538b76b6c135c273cc17c56fac5a7535
commit 2daaf63d538b76b6c135c273cc17c56fac5a7535
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-24 15:30:15 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-08-03 21:52:23 +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
---
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 8e43f267f368..af827c33ee58 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)
{