aboutsummaryrefslogtreecommitdiff
path: root/migration/rdma.c
diff options
context:
space:
mode:
authorWei Yang <richardw.yang@linux.intel.com>2019-07-19 15:11:29 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2019-08-14 17:33:14 +0100
commit6a88eb2b0881c1137b1647147a37de9e818142d8 (patch)
treedf69904826d8cb57b327b15a3cc3e78be97c32c1 /migration/rdma.c
parent52aec70923a19e73f7ecf5da484a9fd1b07634f5 (diff)
migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
Use common helper function to check the state. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <20190719071129.11880-1-richardw.yang@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r--migration/rdma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 3036221ee8..0e73e759ca 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3140,7 +3140,7 @@ static size_t qemu_rdma_save_page(QEMUFile *f, void *opaque,
CHECK_ERROR_STATE();
- if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
+ if (migration_in_postcopy()) {
rcu_read_unlock();
return RAM_SAVE_CONTROL_NOT_SUPP;
}
@@ -3775,7 +3775,7 @@ static int qemu_rdma_registration_start(QEMUFile *f, void *opaque,
CHECK_ERROR_STATE();
- if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
+ if (migration_in_postcopy()) {
rcu_read_unlock();
return 0;
}
@@ -3810,7 +3810,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
CHECK_ERROR_STATE();
- if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
+ if (migration_in_postcopy()) {
rcu_read_unlock();
return 0;
}