come on Julian, make up if you're committing one change or the other.
fix braino
This commit is contained in:
parent
c43aea0f68
commit
5e7b481acf
@ -1698,7 +1698,7 @@ rt_check(struct rtentry **lrt, struct rtentry **lrt0, struct sockaddr *dst)
|
||||
|
||||
KASSERT(*lrt0 != NULL, ("rt_check"));
|
||||
rt = rt0 = *lrt0;
|
||||
fibnum = (*rt0)->rt_fibnum;
|
||||
fibnum = rt0->rt_fibnum;
|
||||
|
||||
/* NB: the locking here is tortuous... */
|
||||
RT_LOCK(rt);
|
||||
|
@ -316,20 +316,36 @@ struct rt_addrinfo {
|
||||
} while (0)
|
||||
|
||||
#define RTFREE_LOCKED(_rt) do { \
|
||||
if ((_rt)->rt_refcnt <= 1) \
|
||||
rtfree(_rt); \
|
||||
else { \
|
||||
RT_REMREF(_rt); \
|
||||
RT_UNLOCK(_rt); \
|
||||
} \
|
||||
/* guard against invalid refs */ \
|
||||
_rt = 0; \
|
||||
} while (0)
|
||||
if ((_rt)->rt_refcnt <= 1) \
|
||||
rtfree(_rt); \
|
||||
else { \
|
||||
RT_REMREF(_rt); \
|
||||
RT_UNLOCK(_rt); \
|
||||
} \
|
||||
/* guard against invalid refs */ \
|
||||
_rt = 0; \
|
||||
} while (0)
|
||||
|
||||
#define RTFREE(_rt) do { \
|
||||
RT_LOCK(_rt); \
|
||||
RTFREE_LOCKED(_rt); \
|
||||
} while (0)
|
||||
RT_LOCK(_rt); \
|
||||
RTFREE_LOCKED(_rt); \
|
||||
} while (0)
|
||||
|
||||
#define RT_TEMP_UNLOCK(_rt) do { \
|
||||
RT_ADDREF(_rt); \
|
||||
RT_UNLOCK(_rt); \
|
||||
} while (0)
|
||||
|
||||
#define RT_RELOCK(_rt) do { \
|
||||
RT_LOCK(_rt); \
|
||||
if ((_rt)->rt_refcnt <= 1) { \
|
||||
rtfree(_rt); \
|
||||
_rt = 0; /* signal that it went away */ \
|
||||
} else { \
|
||||
RT_REMREF(_rt); \
|
||||
/* note that _rt is still valid */ \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
extern struct radix_node_head *rt_tables[][AF_MAX+1];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user