From be9147ddedc35a458b976a71fd947634ab71bb44 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 25 Feb 2021 23:14:22 -0500 Subject: [PATCH 25/54] failover: Use always atomics for primary_should_be_hidden RH-Author: Laurent Vivier Message-id: <20210225231447.2187738-3-lvivier@redhat.com> Patchwork-id: 101247 O-Subject: [RHEL-AV-8.4.0 qemu-kvm PATCH v2 02/27] failover: Use always atomics for primary_should_be_hidden Bugzilla: 1819991 RH-Acked-by: Juan Quintela RH-Acked-by: Jens Freimann RH-Acked-by: Dr. David Alan Gilbert RH-Acked-by: Michael S. Tsirkin From: Juan Quintela BZ: https://bugzilla.redhat.com/1819991 BRANCH: rhel-av-8.4.0 UPSTREAM: Merged Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-4-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 587f2fcb93eddf69736e00731a2da018a0e0a726) Signed-off-by: Laurent Vivier Signed-off-by: Danilo C. L. de Paula --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1011a524bf..a0fa63e7cb 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3136,7 +3136,7 @@ static bool failover_replug_primary(VirtIONet *n, Error **errp) return false; } qdev_set_parent_bus(n->primary_dev, n->primary_bus, &error_abort); - n->primary_should_be_hidden = false; + qatomic_set(&n->primary_should_be_hidden, false); if (!qemu_opt_set_bool(n->primary_device_opts, "partially_hotplugged", true, errp)) { return false; -- 2.27.0