diff mbox

[14/22] IB/ipoib: remove unneeded locks

Message ID 3cd3c664adb2877317c8f684ee344749b2915e45.1423703861.git.dledford@redhat.com (mailing list archive)
State Rejected
Headers show

Commit Message

Doug Ledford Feb. 12, 2015, 1:43 a.m. UTC
During the various work I've done on this, some extra locking has crept
in when things weren't working right.  This is one of those spots.
Remove the unneeded spinlocks.  The mutex is enough to protect against
what we need to protect against.

Signed-off-by: Doug Ledford <dledford@redhat.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Or Gerlitz Feb. 13, 2015, 4:59 p.m. UTC | #1
On 02/12/2015 03:43 AM, Doug Ledford wrote:
> During the various work I've done on this, some extra locking has crept
> in when things weren't working right.  This is one of those spots.
> Remove the unneeded spinlocks.

we need a more concrete/precise text here explaining why these locking 
spots can be removed. What you wrote is too high level and can not 
really be used in future debugging/bisection and maintenance, sorry.

> The mutex is enough to protect against what we need to protect against.

but this is the very same mutex you are removing in a downstream patch 
of the series, isn't that?!

Or.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index a03b6a04203..424c602d5a0 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -497,12 +497,10 @@  static int ipoib_mcast_join_complete(int status,
 		__ipoib_mcast_continue_join_thread(priv, mcast, 1);
 	}
 out:
-	spin_lock_irq(&priv->lock);
 	clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
 	if (status)
 		mcast->mc = NULL;
 	complete(&mcast->done);
-	spin_unlock_irq(&priv->lock);
 	mutex_unlock(&mcast_mutex);
 
 	return status;