aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/9pfs/9p.c')
-rw-r--r--hw/9pfs/9p.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 323f042e65..af636cfb2d 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -406,11 +406,7 @@ static int coroutine_fn put_fid(V9fsPDU *pdu, V9fsFidState *fidp)
* delete the migration blocker. Ideally, this
* should be hooked to transport close notification
*/
- if (pdu->s->migration_blocker) {
- migrate_del_blocker(pdu->s->migration_blocker);
- error_free(pdu->s->migration_blocker);
- pdu->s->migration_blocker = NULL;
- }
+ migrate_del_blocker(&pdu->s->migration_blocker);
}
return free_fid(pdu, fidp);
}
@@ -1505,10 +1501,8 @@ static void coroutine_fn v9fs_attach(void *opaque)
error_setg(&s->migration_blocker,
"Migration is disabled when VirtFS export path '%s' is mounted in the guest using mount_tag '%s'",
s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
- err = migrate_add_blocker(s->migration_blocker, NULL);
+ err = migrate_add_blocker(&s->migration_blocker, NULL);
if (err < 0) {
- error_free(s->migration_blocker);
- s->migration_blocker = NULL;
clunk_fid(s, fid);
goto out;
}