diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2007-08-06 14:26:03 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2007-08-06 14:26:03 +0000 |
commit | 0bf686c1257e2e7944a4cee9d9d628280facaa3d (patch) | |
tree | 63e9e0c42ec5669b83e25b5f9cbdcbee7e1be6dc /sys/netinet/ip_mroute.c | |
parent | ec2af96ad1603562dcbcad9de48a2d0692367e14 (diff) | |
download | src-0bf686c1257e2e7944a4cee9d9d628280facaa3d.tar.gz src-0bf686c1257e2e7944a4cee9d9d628280facaa3d.zip |
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)
Notes
Notes:
svn path=/head/; revision=171744
Diffstat (limited to 'sys/netinet/ip_mroute.c')
-rw-r--r-- | sys/netinet/ip_mroute.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index f5707c05847c..e9b1a31cf073 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -149,10 +149,7 @@ SYSCTL_OPAQUE(_net_inet_ip, OID_AUTO, mfctable, CTLFLAG_RD, static struct mtx mrouter_mtx; #define MROUTER_LOCK() mtx_lock(&mrouter_mtx) #define MROUTER_UNLOCK() mtx_unlock(&mrouter_mtx) -#define MROUTER_LOCK_ASSERT() do { \ - mtx_assert(&mrouter_mtx, MA_OWNED); \ - NET_ASSERT_GIANT(); \ -} while (0) +#define MROUTER_LOCK_ASSERT() mtx_assert(&mrouter_mtx, MA_OWNED) #define MROUTER_LOCK_INIT() \ mtx_init(&mrouter_mtx, "IPv4 multicast forwarding", NULL, MTX_DEF) #define MROUTER_LOCK_DESTROY() mtx_destroy(&mrouter_mtx) @@ -160,10 +157,7 @@ static struct mtx mrouter_mtx; static struct mtx mfc_mtx; #define MFC_LOCK() mtx_lock(&mfc_mtx) #define MFC_UNLOCK() mtx_unlock(&mfc_mtx) -#define MFC_LOCK_ASSERT() do { \ - mtx_assert(&mfc_mtx, MA_OWNED); \ - NET_ASSERT_GIANT(); \ -} while (0) +#define MFC_LOCK_ASSERT() mtx_assert(&mfc_mtx, MA_OWNED) #define MFC_LOCK_INIT() mtx_init(&mfc_mtx, "mroute mfc table", NULL, MTX_DEF) #define MFC_LOCK_DESTROY() mtx_destroy(&mfc_mtx) |