提交 a64265f4 编写于 作者: P Peter Krempa

qemu: caps: Don't check capability before clearing it

Checking whether a qemu capability set right before clearing it without
any other logic doesn't make sense.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 78c2a8b9
......@@ -4602,8 +4602,7 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps)
/* Prealloc on NVDIMMs is broken on older QEMUs leading to
* user data corruption. If we are dealing with such version
* of QEMU pretend we don't know how to NVDIMM. */
if (qemuCaps->version < 2009000 &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM))
if (qemuCaps->version < 2009000)
virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM);
if (ARCH_IS_X86(qemuCaps->arch) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册