Thread (8 messages) 8 messages, 3 authors, 2014-10-06

Re: [PATCH 09/16] virtio-net: drop config_mutex

From: Sergei Shtylyov <hidden>
Date: 2014-10-06 11:46:20
Also in: lkml, virtualization

Hello.

On 10/5/2014 8:07 PM, Michael S. Tsirkin wrote:
config_mutex served two purposes: prevent multiple concurrent config
change handlers, and synchronize access to config_enable flag.
Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1
     workqueue: make all workqueues non-reentrant
all workqueues are non-reentrant, and config_enable
is now gone.
Get rid of the unnecessary lock.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
  drivers/net/virtio_net.c | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)
quoted hunk ↗ jump to hunk
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 hunk ↗ jump to hunk
@@ -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;
    There's no need for this *return*.
  }

  static void virtnet_config_changed(struct virtio_device *vdev)
WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help