FreeBSD: Remove references to DEBUG_VFS_LOCKS

This option is removed upstream in favour of plain INVARIANTS.

VNASSERT is always defined so I see no reason to use it conditionally.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes #18136
This commit is contained in:
Mark Johnston authored and GitHub committed 2026-01-19 08:55:17 -08:00
1 parent 8605bdfdda
commit 54b141fab5
2 files changed
+2 -17

No files matched your search

-5
View File
@@ -62,11 +62,6 @@ CFLAGS+= -DZFS_DEBUG -g
CFLAGS += -DNDEBUG
.endif
.if defined(WITH_VFS_DEBUG) && ${WITH_VFS_DEBUG} == "true"
# kernel must also be built with this option for this to work
CFLAGS+= -DDEBUG_VFS_LOCKS
.endif
.if defined(WITH_GCOV) && ${WITH_GCOV} == "true"
CFLAGS+= -fprofile-arcs -ftest-coverage
.endif
+2 -12
View File
@@ -102,14 +102,6 @@
VFS_SMR_DECLARE;
#ifdef DEBUG_VFS_LOCKS
#define VNCHECKREF(vp) \
VNASSERT((vp)->v_holdcnt > 0 && (vp)->v_usecount > 0, vp, \
("%s: wrong ref counts", __func__));
#else
#define VNCHECKREF(vp)
#endif
#if __FreeBSD_version >= 1400045
typedef uint64_t cookie_t;
#else
@@ -1060,9 +1052,6 @@ zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
zfs_acl_ids_t acl_ids;
boolean_t fuid_dirtied;
uint64_t txtype;
#ifdef DEBUG_VFS_LOCKS
vnode_t *dvp = ZTOV(dzp);
#endif
if (is_nametoolong(zfsvfs, name))
return (SET_ERROR(ENAMETOOLONG));
@@ -1192,7 +1181,8 @@ zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
getnewvnode_drop_reserve();
out:
VNCHECKREF(dvp);
VNASSERT(ZTOV(dzp)->v_holdcnt > 0 && ZTOV(dzp)->v_usecount > 0,
ZTOV(dzp), ("%s: wrong ref counts", __func__));
if (error == 0) {
*zpp = zp;
}