diff options
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 56c87a81bb67..54fbead4de01 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -644,6 +644,9 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
644 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 644 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
645 | int ret = 0; | 645 | int ret = 0; |
646 | 646 | ||
647 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)) | ||
648 | ib_sa_free_multicast(mcast->mc); | ||
649 | |||
647 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { | 650 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) { |
648 | ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", | 651 | ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n", |
649 | IPOIB_GID_ARG(mcast->mcmember.mgid)); | 652 | IPOIB_GID_ARG(mcast->mcmember.mgid)); |
@@ -655,9 +658,6 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) | |||
655 | ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret); | 658 | ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret); |
656 | } | 659 | } |
657 | 660 | ||
658 | if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags)) | ||
659 | ib_sa_free_multicast(mcast->mc); | ||
660 | |||
661 | return 0; | 661 | return 0; |
662 | } | 662 | } |
663 | 663 | ||