Messages in this thread Patch in this message | | | Subject | [PATCH][7/11] IB/ipoib: use list_for_each_entry_safe when required | Date | Wed, 2 Mar 2005 21:31:22 -0800 | From | Roland Dreier <> |
| |
From: Shirley Ma <xma@us.ibm.com>
Change uses of list_for_each_entry() where the loop variable is freed inside the loop to list_for_each_entry_safe().
Signed-off-by: Shirley Ma <xma@us.ibm.com> Signed-off-by: Roland Dreier <roland@topspin.com>
--- linux-export.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-02 20:26:02.832873236 -0800 +++ linux-export/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-02 20:26:12.799709771 -0800 @@ -790,7 +790,7 @@ spin_unlock_irqrestore(&priv->lock, flags); - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(dev, mcast); ipoib_mcast_free(mcast); } @@ -902,7 +902,7 @@ spin_unlock_irqrestore(&priv->lock, flags); /* We have to cancel outside of the spinlock */ - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(mcast->dev, mcast); ipoib_mcast_free(mcast); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |