Removing rtnl_lock() from virtnet_ack_link_announce(). This is to facilitate separating cq-related functions into a separate file. Signed-off-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> --- drivers/net/virtio/virtnet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtnet.c b/drivers/net/virtio/virtnet.c index 6ad217af44d9..4a3b5efb674e 100644 --- a/drivers/net/virtio/virtnet.c +++ b/drivers/net/virtio/virtnet.c @@ -2083,11 +2083,9 @@ static void virtnet_stats(struct net_device *dev, static void virtnet_ack_link_announce(struct virtnet_info *vi) { - rtnl_lock(); if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_ANNOUNCE, VIRTIO_NET_CTRL_ANNOUNCE_ACK, NULL)) dev_warn(&vi->dev->dev, "Failed to ack link announce.\n"); - rtnl_unlock(); } static int virtnet_ctrl_set_queues(struct virtnet_info *vi, u16 queue_pairs) @@ -3187,7 +3185,10 @@ static void virtnet_config_changed_work(struct work_struct *work) if (v & VIRTIO_NET_S_ANNOUNCE) { netdev_notify_peers(vi->dev); + + rtnl_lock(); virtnet_ack_link_announce(vi); + rtnl_unlock(); } /* Ignore unknown (future) status bits */ -- 2.32.0.3.g01195cf9f