]> git.proxmox.com Git - mirror_qemu.git/commit
9pfs: clear migration blocker at session reset
authorGreg Kurz <groug@kaod.org>
Tue, 4 Apr 2017 16:06:01 +0000 (18:06 +0200)
committerGreg Kurz <groug@kaod.org>
Tue, 4 Apr 2017 16:06:01 +0000 (18:06 +0200)
commit6d54af0ea9eeee70b4c0eb48bd2ae1d22b207dd4
tree5f75acdfbb5eca559f4c094c0387ecebed4f0b67
parent18adde86ddc6dbef865a3d360bf8e15dce85756d
9pfs: clear migration blocker at session reset

The migration blocker survives a device reset: if the guest mounts a 9p
share and then gets rebooted with system_reset, it will be unmigratable
until it remounts and umounts the 9p share again.

This happens because the migration blocker is supposed to be cleared when
we put the last reference on the root fid, but virtfs_reset() wrongly calls
free_fid() instead of put_fid().

This patch fixes virtfs_reset() so that it honor the way fids are supposed
to be manipulated: first get a reference and later put it back when you're
done.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Li Qiang <liqiang6-s@360.cn>
hw/9pfs/9p.c