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: 063d811465
This commit is contained in:
parent
5be5d0d5cb
commit
e03b7883e9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user