mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Cleanup the unused 'nodeinfo'
"nodeinfo" is not used in these two functions, and it's waste of goto in qemuProcessSetEmulatorAffinites
This commit is contained in:
parent
2143ced7f5
commit
5828080f71
@ -2004,14 +2004,9 @@ qemuProcessSetVcpuAffinites(virConnectPtr conn,
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virDomainDefPtr def = vm->def;
|
||||
virNodeInfo nodeinfo;
|
||||
int vcpu, n;
|
||||
int ret = -1;
|
||||
|
||||
if (virNodeGetInfo(conn, &nodeinfo) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!def->cputune.nvcpupin)
|
||||
return 0;
|
||||
|
||||
@ -2042,23 +2037,16 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn,
|
||||
{
|
||||
virBitmapPtr cpumask;
|
||||
virDomainDefPtr def = vm->def;
|
||||
virNodeInfo nodeinfo;
|
||||
int ret = -1;
|
||||
|
||||
if (virNodeGetInfo(conn, &nodeinfo) != 0)
|
||||
return -1;
|
||||
|
||||
if (def->cputune.emulatorpin) {
|
||||
if (def->cputune.emulatorpin)
|
||||
cpumask = def->cputune.emulatorpin->cpumask;
|
||||
} else if (def->cpumask) {
|
||||
else if (def->cpumask)
|
||||
cpumask = def->cpumask;
|
||||
} else {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
ret = virProcessInfoSetAffinity(vm->pid, cpumask);
|
||||
cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user