The branch main has been updated by glebius:

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

commit e03b7883e97cd1ff9b963eea401c7f4819328f71
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2022-10-18 15:34:03 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2022-10-18 15:34:03 +0000

    mbuf: don't include lock.h conditionally
    
    Using keywords from opt_global.h in the system headers allows to
    create cryptic kernel build failures, that depend on the options
    used in the kernel config, very hard to debug and understand.
    
    Fixes:  063d8114650c025240604b5c6df9358355fc98f4
---
 sys/sys/mbuf.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 97bfd56536e0..a6a28291123d 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -42,12 +42,7 @@
 #include <sys/systm.h>
 #include <sys/refcount.h>
 #include <vm/uma.h>
-#ifdef WITNESS
-#include <sys/lock.h>
-#endif
-#endif
 
-#ifdef _KERNEL
 #include <sys/sdt.h>
 
 #define        MBUF_PROBE1(probe, arg0)                                        
\
@@ -791,15 +786,11 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff)
 #ifdef _KERNEL
 union if_snd_tag_alloc_params;
 
-#ifdef WITNESS
 #define        MBUF_CHECKSLEEP(how) do {                                       
\
        if (how == M_WAITOK)                                            \
                WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,         \
                    "Sleeping in \"%s\"", __func__);                    \
 } while (0)
-#else
-#define        MBUF_CHECKSLEEP(how) do {} while (0)
-#endif
 
 /*
  * Network buffer allocation API

Reply via email to