From 23574c86734ab5cb088584d30345e698cbbeaef2 Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 6 Aug 2007 14:26:03 +0000 Subject: Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases. While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency. Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith) --- sys/net/bpfdesc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sys/net/bpfdesc.h') diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h index 7db0e12..a46013e 100644 --- a/sys/net/bpfdesc.h +++ b/sys/net/bpfdesc.h @@ -102,10 +102,7 @@ struct bpf_d { #define BPFD_LOCK(bd) mtx_lock(&(bd)->bd_mtx) #define BPFD_UNLOCK(bd) mtx_unlock(&(bd)->bd_mtx) -#define BPFD_LOCK_ASSERT(bd) do { \ - mtx_assert(&(bd)->bd_mtx, MA_OWNED); \ - NET_ASSERT_GIANT(); \ -} while (0) +#define BPFD_LOCK_ASSERT(bd) mtx_assert(&(bd)->bd_mtx, MA_OWNED); /* Test whether a BPF is ready for read(). */ #define bpf_ready(bd) \ -- cgit v1.1