From: Peter Krempa <[email protected]> We pass in 'vm' which contains it in the private data.
Signed-off-by: Peter Krempa <[email protected]> --- src/qemu/qemu_migration.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index a64a98046a..32afc788ad 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -7142,8 +7142,7 @@ qemuMigrationProcessUnattended(virQEMUDriver *driver, static int -qemuMigrationSrcToLegacyFile(virQEMUDriver *driver, - virDomainObj *vm, +qemuMigrationSrcToLegacyFile(virDomainObj *vm, int fd, virCommand *compressor, virDomainAsyncJob asyncJob) @@ -7160,7 +7159,7 @@ qemuMigrationSrcToLegacyFile(virQEMUDriver *driver, * doesn't have to open() the file, so while we still have to * grant SELinux access, we can do it on fd and avoid cleanup * later, as well as skip futzing with cgroup. */ - if (qemuSecuritySetImageFDLabel(driver->securityManager, vm->def, + if (qemuSecuritySetImageFDLabel(priv->driver->securityManager, vm->def, compressor ? pipeFD[1] : fd) < 0) goto cleanup; @@ -7294,7 +7293,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDomainObj *vm, qemuMigrationParamsCapEnabled(migParams, QEMU_MIGRATION_CAP_MAPPED_RAM)) rc = qemuMigrationSrcToSparseFile(driver, vm, path, fd, bypassCache, asyncJob); else - rc = qemuMigrationSrcToLegacyFile(driver, vm, *fd, compressor, asyncJob); + rc = qemuMigrationSrcToLegacyFile(vm, *fd, compressor, asyncJob); if (rc < 0) goto cleanup; -- 2.52.0
