Re: [PATCH 09/16] virtio-net: drop config_mutex
From: Sergei Shtylyov <hidden>
Date: 2014-10-06 12:31:45
Also in:
lkml, netdev
On 10/6/2014 4:22 PM, Michael S. Tsirkin wrote:
quoted
quoted
quoted
quoted
config_mutex served two purposes: prevent multiple concurrent config change handlers, and synchronize access to config_enable flag.
quoted
quoted
quoted
quoted
Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1 workqueue: make all workqueues non-reentrant all workqueues are non-reentrant, and config_enable is now gone.
quoted
quoted
quoted
quoted
Get rid of the unnecessary lock.
quoted
quoted
quoted
quoted
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- drivers/net/virtio_net.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
quoted
quoted
quoted
quoted
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fa17afa..d80fef4 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c[...]quoted
@@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) netif_tx_stop_all_queues(vi->dev); } done: - mutex_unlock(&vi->config_lock); + return;
quoted
quoted
quoted
There's no need for this *return*.
quoted
quoted
I know - it's removed by the follow-up patch.
quoted
Yeah, I saw.
quoted
quoted
It's formatted like this to make diff smaller and make review easier.
quoted
Don't understand how adding this line makes diff smaller though... You first need to add it and then to delete it, where's the save?
quoted
WBR, Sergei
If I don't add it, gcc generates a compiler warning: it does not like labels at the end of functions.
Ahh... nevermind then.
WBR, Sergei