diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-07-05 09:28:50 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-07-12 17:56:29 -0400 |
| commit | 0cbd5855a97197f62b04a5b90ac79d78725511cb (patch) | |
| tree | 545b3f60c52bf3ca8fa45b8b305736d1b30278ce /ospf6d/ospf6_lsdb.c | |
| parent | c362e274b22eb411793ab93a50a9ed6e7bc67889 (diff) | |
ospf6d: Convert ospf6_lsa_unlock to a better api
Make the ospf6_lsa_unlock take the same parameters
that the ospf_lsa_unlock does to make it consistent
and to also ensure that no-one can make the mistake
of getting the pointer cleared up.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_lsdb.c')
| -rw-r--r-- | ospf6d/ospf6_lsdb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c index fa1a9a408d..355860f6b1 100644 --- a/ospf6d/ospf6_lsdb.c +++ b/ospf6d/ospf6_lsdb.c @@ -139,7 +139,7 @@ void ospf6_lsdb_add(struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb) } /* to free the lookup lock in node get*/ route_unlock_node(current); - ospf6_lsa_unlock(old); + ospf6_lsa_unlock(&old); } ospf6_lsdb_count_assert(lsdb); @@ -168,7 +168,7 @@ void ospf6_lsdb_remove(struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb) route_unlock_node(node); /* to free the lookup lock */ route_unlock_node(node); /* to free the original lock */ - ospf6_lsa_unlock(lsa); + ospf6_lsa_unlock(&lsa); ospf6_lsdb_count_assert(lsdb); } @@ -237,7 +237,7 @@ struct ospf6_lsa *ospf6_find_inter_prefix_lsa(struct ospf6 *ospf6, ospf6_prefix_in6_addr(&prefix.u.prefix6, prefix_lsa, &prefix_lsa->prefix); if (prefix_same(p, &prefix)) { - ospf6_lsa_unlock(lsa); + ospf6_lsa_unlock(&lsa); return lsa; } } @@ -328,7 +328,7 @@ struct ospf6_lsa *ospf6_lsdb_next(const struct route_node *iterend, { struct route_node *node = lsa->rn; - ospf6_lsa_unlock(lsa); + ospf6_lsa_unlock(&lsa); do node = route_next_until(node, iterend); @@ -361,7 +361,7 @@ void ospf6_lsdb_lsa_unlock(struct ospf6_lsa *lsa) if (lsa != NULL) { if (lsa->rn != NULL) route_unlock_node(lsa->rn); - ospf6_lsa_unlock(lsa); + ospf6_lsa_unlock(&lsa); } } |
