summaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv.c
diff options
context:
space:
mode:
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>2020-06-17 18:46:38 +0200
committerWei Liu <wei.liu@kernel.org>2020-06-19 15:38:23 +0000
commit12d0dd8e728e785e6fb81f5232280678bc69d8dc (patch)
treec1bc8d15f15276482def26925a7d44090244a3c1 /drivers/hv/hv.c
parent0a96820929f01ecf4cb1c33afe7044c301a06c2c (diff)
downloadlinux-12d0dd8e728e785e6fb81f5232280678bc69d8dc.tar.bz2
Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list readers)
Additions/deletions to/from sc_list (as well as modifications of target_cpu(s)) are protected by channel_mutex, which hv_synic_cleanup() and vmbus_bus_suspend() own for the duration of the channel->lock critical section in question. Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/20200617164642.37393-5-parri.andrea@gmail.com Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/hv.c')
-rw-r--r--drivers/hv/hv.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 857290dcfd95..da69338f92f5 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -241,7 +241,6 @@ int hv_synic_cleanup(unsigned int cpu)
{
struct vmbus_channel *channel, *sc;
bool channel_found = false;
- unsigned long flags;
/*
* Hyper-V does not provide a way to change the connect CPU once
@@ -263,14 +262,12 @@ int hv_synic_cleanup(unsigned int cpu)
channel_found = true;
break;
}
- spin_lock_irqsave(&channel->lock, flags);
list_for_each_entry(sc, &channel->sc_list, sc_list) {
if (sc->target_cpu == cpu) {
channel_found = true;
break;
}
}
- spin_unlock_irqrestore(&channel->lock, flags);
if (channel_found)
break;
}