|
@@ -644,6 +644,9 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
|
|
+ if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
|
|
|
|
+ ib_sa_free_multicast(mcast->mc);
|
|
|
|
+
|
|
if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
|
|
if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
|
|
ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n",
|
|
ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n",
|
|
IPOIB_GID_ARG(mcast->mcmember.mgid));
|
|
IPOIB_GID_ARG(mcast->mcmember.mgid));
|
|
@@ -655,9 +658,6 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret);
|
|
ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret);
|
|
}
|
|
}
|
|
|
|
|
|
- if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
|
|
|
|
- ib_sa_free_multicast(mcast->mc);
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|