Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18305
b: refs/heads/master
c: 97460df
h: refs/heads/master
i:
  18303: 8e33995
v: v3
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Jan 10, 2006
1 parent 6b7c6c8 commit 945dfe3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 70b4c8cdc168bb5d18e23fd205c4ede1b756a8b2
refs/heads/master: 97460df37ea3335ca11562568932c9f9facfecdb
13 changes: 7 additions & 6 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ static void ipoib_mcast_free(struct ipoib_mcast *mcast)
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_neigh *neigh, *tmp;
unsigned long flags;
LIST_HEAD(ah_list);
struct ipoib_ah *ah, *tah;

ipoib_dbg_mcast(netdev_priv(dev),
"deleting multicast group " IPOIB_GID_FMT "\n",
Expand All @@ -107,18 +105,21 @@ static void ipoib_mcast_free(struct ipoib_mcast *mcast)
spin_lock_irqsave(&priv->lock, flags);

list_for_each_entry_safe(neigh, tmp, &mcast->neigh_list, list) {
/*
* It's safe to call ipoib_put_ah() inside priv->lock
* here, because we know that mcast->ah will always
* hold one more reference, so ipoib_put_ah() will
* never do more than decrement the ref count.
*/
if (neigh->ah)
list_add_tail(&neigh->ah->list, &ah_list);
ipoib_put_ah(neigh->ah);
*to_ipoib_neigh(neigh->neighbour) = NULL;
neigh->neighbour->ops->destructor = NULL;
kfree(neigh);
}

spin_unlock_irqrestore(&priv->lock, flags);

list_for_each_entry_safe(ah, tah, &ah_list, list)
ipoib_put_ah(ah);

if (mcast->ah)
ipoib_put_ah(mcast->ah);

Expand Down

0 comments on commit 945dfe3

Please sign in to comment.