Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27621
b: refs/heads/master
c: 31c02e2
h: refs/heads/master
i:
  27619: 1281df6
v: v3
  • Loading branch information
Roland Dreier committed Jun 18, 2006
1 parent ba5bbdc commit 5238668
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 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: 9874e746550fbd366484621b8838b98589bb2a15
refs/heads/master: 31c02e215700c2b704d9441f629ae87bb9aeb561
27 changes: 9 additions & 18 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,9 @@ void ipoib_free_ah(struct kref *kref)

unsigned long flags;

if ((int) priv->tx_tail - (int) ah->last_send >= 0) {
ipoib_dbg(priv, "Freeing ah %p\n", ah->ah);
ib_destroy_ah(ah->ah);
kfree(ah);
} else {
spin_lock_irqsave(&priv->lock, flags);
list_add_tail(&ah->list, &priv->dead_ahs);
spin_unlock_irqrestore(&priv->lock, flags);
}
spin_lock_irqsave(&priv->lock, flags);
list_add_tail(&ah->list, &priv->dead_ahs);
spin_unlock_irqrestore(&priv->lock, flags);
}

static int ipoib_ib_post_receive(struct net_device *dev, int id)
Expand Down Expand Up @@ -377,19 +371,16 @@ static void __ipoib_reap_ah(struct net_device *dev)
struct ipoib_ah *ah, *tah;
LIST_HEAD(remove_list);

spin_lock_irq(&priv->lock);
spin_lock_irq(&priv->tx_lock);
spin_lock(&priv->lock);
list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list)
if ((int) priv->tx_tail - (int) ah->last_send >= 0) {
list_del(&ah->list);
list_add_tail(&ah->list, &remove_list);
ib_destroy_ah(ah->ah);
kfree(ah);
}
spin_unlock_irq(&priv->lock);

list_for_each_entry_safe(ah, tah, &remove_list, list) {
ipoib_dbg(priv, "Reaping ah %p\n", ah->ah);
ib_destroy_ah(ah->ah);
kfree(ah);
}
spin_unlock(&priv->lock);
spin_unlock_irq(&priv->tx_lock);
}

void ipoib_reap_ah(void *dev_ptr)
Expand Down

0 comments on commit 5238668

Please sign in to comment.