Commit 7e6f182b authored by David Ahern's avatar David Ahern Committed by David S. Miller

neighbor: Remove state and flags arguments to neigh_del

neigh_del now only has 1 caller, and the state and flags arguments
are both 0. Remove them and simplify neigh_del.
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 758a7f0b
...@@ -153,14 +153,13 @@ static void neigh_update_gc_list(struct neighbour *n) ...@@ -153,14 +153,13 @@ static void neigh_update_gc_list(struct neighbour *n)
write_unlock_bh(&n->tbl->lock); write_unlock_bh(&n->tbl->lock);
} }
static bool neigh_del(struct neighbour *n, __u8 state, __u8 flags, static bool neigh_del(struct neighbour *n, struct neighbour __rcu **np,
struct neighbour __rcu **np, struct neigh_table *tbl) struct neigh_table *tbl)
{ {
bool retval = false; bool retval = false;
write_lock(&n->lock); write_lock(&n->lock);
if (refcount_read(&n->refcnt) == 1 && !(n->nud_state & state) && if (refcount_read(&n->refcnt) == 1) {
!(n->flags & flags)) {
struct neighbour *neigh; struct neighbour *neigh;
neigh = rcu_dereference_protected(n->next, neigh = rcu_dereference_protected(n->next,
...@@ -192,7 +191,7 @@ bool neigh_remove_one(struct neighbour *ndel, struct neigh_table *tbl) ...@@ -192,7 +191,7 @@ bool neigh_remove_one(struct neighbour *ndel, struct neigh_table *tbl)
while ((n = rcu_dereference_protected(*np, while ((n = rcu_dereference_protected(*np,
lockdep_is_held(&tbl->lock)))) { lockdep_is_held(&tbl->lock)))) {
if (n == ndel) if (n == ndel)
return neigh_del(n, 0, 0, np, tbl); return neigh_del(n, np, tbl);
np = &n->next; np = &n->next;
} }
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment