Naming consistency fix. The routing code defines
RADIX_NODE_HEAD_LOCK as grabbing the write lock, but RADIX_NODE_HEAD_LOCK_ASSERT as checking the read lock. Submitted by: Vijay Singh <vijju.singh at gmail.com> MFC after: 1 month
This commit is contained in:
parent
c402193a1a
commit
6db7075105
@ -149,7 +149,8 @@ struct radix_node_head {
|
||||
|
||||
|
||||
#define RADIX_NODE_HEAD_DESTROY(rnh) rw_destroy(&(rnh)->rnh_lock)
|
||||
#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_LOCKED)
|
||||
#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_WLOCKED)
|
||||
#define RADIX_NODE_HEAD_RLOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_RLOCKED)
|
||||
#define RADIX_NODE_HEAD_WLOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_WLOCKED)
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
@ -381,7 +381,7 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long ignflags,
|
||||
RADIX_NODE_HEAD_RLOCK(rnh);
|
||||
#ifdef INVARIANTS
|
||||
else
|
||||
RADIX_NODE_HEAD_LOCK_ASSERT(rnh);
|
||||
RADIX_NODE_HEAD_RLOCK_ASSERT(rnh);
|
||||
#endif
|
||||
rn = rnh->rnh_matchaddr(dst, rnh);
|
||||
if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
|
||||
@ -1000,9 +1000,10 @@ rn_mpath_update(int req, struct rt_addrinfo *info,
|
||||
* a matching RTAX_GATEWAY.
|
||||
*/
|
||||
struct rtentry *rt, *rto = NULL;
|
||||
register struct radix_node *rn;
|
||||
struct radix_node *rn;
|
||||
int error = 0;
|
||||
|
||||
RADIX_NODE_HEAD_LOCK_ASSERT(rnh);
|
||||
rn = rnh->rnh_lookup(dst, netmask, rnh);
|
||||
if (rn == NULL)
|
||||
return (ESRCH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user