Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194579
b: refs/heads/master
c: 7e80c12
h: refs/heads/master
i:
  194577: 55dc367
  194575: 2e53a2a
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Apr 28, 2010
1 parent 1dc54b9 commit b51035e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcd79aebe736e88d62aeb4a7712ac0ba7cc2aa96
refs/heads/master: 7e80c124485b73146deadce14fd4da2054581806
19 changes: 11 additions & 8 deletions trunk/net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,22 +1039,25 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br,
}
#endif

/*
* Add port to rotuer_list
* list is maintained ordered by pointer value
* and locked by br->multicast_lock and RCU
*/
static void br_multicast_add_router(struct net_bridge *br,
struct net_bridge_port *port)
{
struct net_bridge_port *p;
struct hlist_node *n, *last = NULL;
struct hlist_node *n, *slot = NULL;

hlist_for_each_entry(p, n, &br->router_list, rlist) {
if ((unsigned long) port >= (unsigned long) p) {
hlist_add_before_rcu(n, &port->rlist);
return;
}
last = n;
if ((unsigned long) port >= (unsigned long) p)
break;
slot = n;
}

if (last)
hlist_add_after_rcu(last, &port->rlist);
if (slot)
hlist_add_after_rcu(slot, &port->rlist);
else
hlist_add_head_rcu(&port->rlist, &br->router_list);
}
Expand Down

0 comments on commit b51035e

Please sign in to comment.