diff options
author | Christoph Lameter <cl@linux.com> | 2015-12-21 14:42:53 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-12-23 19:28:00 (GMT) |
commit | 5a0e81f6f4838816a265b948a6439c9fcd76b017 (patch) | |
tree | 8f30eb44529e6691bc78ee355a37b60da71ec3d2 /drivers/infiniband/ulp/ipoib/ipoib_main.c | |
parent | e53505a802048dc0292609c56411ffdaad013c8e (diff) | |
download | linux-5a0e81f6f4838816a265b948a6439c9fcd76b017.tar.xz |
IB/IPoIB: factor out common multicast list removal code
Code cleanup to remove multicast specific code from ipoib_main.c
The removal of a list of multicast groups occurs in three places.
Create a new function ipoib_mcast_remove_list(). Use this new
function in ipoib_main.c too.
That in turn allows the dropping of two functions that were
exported from ipoib_multicast.c for expiration of mc groups.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 58732c5..4abc999 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1150,7 +1150,7 @@ static void __ipoib_reap_neigh(struct ipoib_dev_priv *priv) unsigned long flags; int i; LIST_HEAD(remove_list); - struct ipoib_mcast *mcast, *tmcast; + struct ipoib_mcast *mcast; struct net_device *dev = priv->dev; if (test_bit(IPOIB_STOP_NEIGH_GC, &priv->flags)) @@ -1207,10 +1207,7 @@ static void __ipoib_reap_neigh(struct ipoib_dev_priv *priv) out_unlock: spin_unlock_irqrestore(&priv->lock, flags); - list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { - ipoib_mcast_leave(dev, mcast); - ipoib_mcast_free(mcast); - } + ipoib_mcast_remove_list(dev, &remove_list); } static void ipoib_reap_neigh(struct work_struct *work) |