Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove assertion that the lock isn't held
details: https://anonhg.NetBSD.org/src/rev/0ee17dcff5bb
branches: trunk
changeset: 349749:0ee17dcff5bb
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Dec 22 03:46:51 2016 +0000
description:
Remove assertion that the lock isn't held
It's useless in this case, because without it we can know that
the lock is held or not on a next lock acquisition and even more
if LOCKDEBUG is enabled a failure on the acquisition will provide
useful information for debugging while an assertion failure will
provide just the fact that the assertion failed.
diffstat:
sys/net/if.h | 4 +---
sys/netinet6/nd6.c | 5 ++---
2 files changed, 3 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r cf25f09b78f4 -r 0ee17dcff5bb sys/net/if.h
--- a/sys/net/if.h Wed Dec 21 22:49:14 2016 +0000
+++ b/sys/net/if.h Thu Dec 22 03:46:51 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.232 2016/12/13 02:05:48 ozaki-r Exp $ */
+/* $NetBSD: if.h,v 1.233 2016/12/22 03:46:51 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -510,8 +510,6 @@
KASSERT(rw_read_held((ifp)->if_afdata_lock))
#define IF_AFDATA_WLOCK_ASSERT(ifp) \
KASSERT(rw_write_held((ifp)->if_afdata_lock))
-#define IF_AFDATA_UNLOCK_ASSERT(ifp) \
- KASSERT(!rw_lock_held((ifp)->if_afdata_lock))
/*
* Output queues (ifp->if_snd) and internetwork datagram level (pup level 1)
diff -r cf25f09b78f4 -r 0ee17dcff5bb sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Wed Dec 21 22:49:14 2016 +0000
+++ b/sys/netinet6/nd6.c Thu Dec 22 03:46:51 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.222 2016/12/21 08:47:02 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.223 2016/12/22 03:46:51 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.222 2016/12/21 08:47:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.223 2016/12/22 03:46:51 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1146,7 +1146,6 @@
}
ND6_UNLOCK();
- IF_AFDATA_UNLOCK_ASSERT(ifp);
if (nd6_is_new_addr_neighbor(addr, ifp))
return 1;
Home |
Main Index |
Thread Index |
Old Index