git: 951218e5d960 - stable/12 - pf: add PF_UNLNKDRULES_ASSERT

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Mon, 28 Mar 2022 11:37:57 UTC
The branch stable/12 has been updated by mjg:

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

commit 951218e5d96092ef220fbc2399d8828609527942
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-02-28 10:37:30 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-03-28 11:37:37 +0000

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

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 22ba2623a6c4..5b8ab84502bd 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -349,6 +349,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