migration: Drop cached migration state in migration_maybe_pause()
authorPeter Xu <peterx@redhat.com>
Tue, 14 Jan 2025 23:07:39 +0000 (18:07 -0500)
committerFabiano Rosas <farosas@suse.de>
Wed, 29 Jan 2025 14:56:41 +0000 (11:56 -0300)
commitec611bd731af7dce318fffc96f57c46e62fb7e16
treeaf35ccab03fc1e14d8bef8d66f0ed22764102fe7
parent1f9b657cae637ec657aa92a5d7616581ada70672
migration: Drop cached migration state in migration_maybe_pause()

I can't see why we must cache the state now after we avoided possible
CANCEL race: that's the only thing I can think of that can modify the
migration state concurrently with the migration thread itself.  Make all
the state updates to happen always, then we don't need to cache the state
anymore.

Signed-off-by: Peter Xu <peterx@redhat.com>
Tested-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Juraj Marcin <jmarcin@redhat.com>
Link: https://lore.kernel.org/r/20250114230746.3268797-10-peterx@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/migration.c