virtio_net: Fix not restoring real_num_rx_queues
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tue, 29 Jan 2019 00:45:55 +0000 (09:45 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:30:10 +0000 (17:30 +0100)
commitd97117bd077d9396cb9c6d4e263d074a5c91fd15
treef5da94343c11978aa646b5b91312dc181df2416f
parent4c2e63dc645233d97853061c82b6e1a5b4cb36eb
virtio_net: Fix not restoring real_num_rx_queues

[ Upstream commit 188313c137c4f76afd0862f50dbc185b198b9e2a ]

When _virtnet_set_queues() failed we did not restore real_num_rx_queues.
Fix this by placing the change of real_num_rx_queues after
_virtnet_set_queues().
This order is also in line with virtnet_set_channels().

Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/virtio_net.c