git: f11b6505f146 - main - pf: add PF_UNLNKDRULES_ASSERT

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Thu, 10 Mar 2022 17:21:11 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=f11b6505f14600d350dfa427f61abb8d1c7e1db4

commit f11b6505f14600d350dfa427f61abb8d1c7e1db4
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-02-28 10:37:30 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-03-10 17:20:41 +0000

    pf: add PF_UNLNKDRULES_ASSERT
    
    Reviewed by:    kp
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/net/pfvar.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 252b3adbe958..57acab788b20 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -355,6 +355,7 @@ struct pfi_dynaddr {
 extern struct mtx_padalign pf_unlnkdrules_mtx;
 #define	PF_UNLNKDRULES_LOCK()	mtx_lock(&pf_unlnkdrules_mtx)
 #define	PF_UNLNKDRULES_UNLOCK()	mtx_unlock(&pf_unlnkdrules_mtx)
+#define	PF_UNLNKDRULES_ASSERT()	mtx_assert(&pf_unlnkdrules_mtx, MA_OWNED)
 
 extern struct rmlock pf_rules_lock;
 #define	PF_RULES_RLOCK_TRACKER	struct rm_priotracker _pf_rules_tracker