summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 20f9835d..cd4c6892 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -1287,7 +1287,7 @@ rta_lookup(rta *o)
for(r=rta_hash_table[h & rta_cache_mask]; r; r=r->next)
if (r->hash_key == h && rta_same(r, o))
{
- atomic_fetch_add_explicit(&r->uc, 1, memory_order_acq_rel);
+ r->uc++;
RTA_UNLOCK;
return r;
}
@@ -1308,14 +1308,6 @@ rta_lookup(rta *o)
void
rta__free(rta *a)
{
- RTA_LOCK;
- if (atomic_load_explicit(&a->uc, memory_order_acquire))
- {
- /* Somebody has cloned this rta inbetween. This sometimes happens. */
- RTA_UNLOCK;
- return;
- }
-
ASSERT(rta_cache_count && a->cached);
rta_cache_count--;
*a->pprev = a->next;
@@ -1327,7 +1319,6 @@ rta__free(rta *a)
ea_free(a->eattrs);
a->cached = 0;
sl_free(rta_slab(a), a);
- RTA_UNLOCK;
}
rta *