diff options
author | Doug Ledford <dledford@redhat.com> | 2015-02-22 03:27:07 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-04-15 23:06:18 +0300 |
commit | 1c0453d64a341909bbf89cb68c9edaa6cff93850 (patch) | |
tree | c287b5518d572e6be2b634fcf32084f8837f0dab /drivers/infiniband/ulp/ipoib/ipoib_verbs.c | |
parent | d2fe937ce6ce23daf5fb214e45432dbb631581b7 (diff) | |
download | linux-1c0453d64a341909bbf89cb68c9edaa6cff93850.tar.xz |
IB/ipoib: drop mcast_mutex usage
We needed the mcast_mutex when we had to prevent the join completion
callback from having the value it stored in mcast->mc overwritten
by a delayed return from ib_sa_join_multicast. By storing the return
of ib_sa_join_multicast in an intermediate variable, we prevent a
delayed return from ib_sa_join_multicast overwriting the valid
contents of mcast->mc, and we no longer need a mutex to force the
join callback to run after the return of ib_sa_join_multicast. This
allows us to do away with the mutex entirely and protect our critical
sections with a just a spinlock instead. This is highly desirable
as there were some places where we couldn't use a mutex because the
code was not allowed to sleep, and so we were currently using a mix
of mutex and spinlock to protect what we needed to protect. Now we
only have a spin lock and the locking complexity is greatly reduced.
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_verbs.c')
0 files changed, 0 insertions, 0 deletions