From 4346c9eb97ce61fea0b883d5784295c9c4a09b15 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 8 Mar 2017 15:56:36 +0100 Subject: [PATCH] qemuBuildMemoryBackendStr: Don't overwrite @force This is an input argument. We should not overwrite it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b484b7ba07..b30bb670f8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3302,7 +3302,6 @@ qemuBuildMemoryBackendStr(unsigned long long size, if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) { /* we can have both pagesize and mem source, then check mem source first */ - force = true; if (virJSONValueObjectAdd(props, "s:mem-path", cfg->memoryBackingDir, NULL) < 0) @@ -3372,7 +3371,8 @@ qemuBuildMemoryBackendStr(unsigned long long size, } /* If none of the following is requested... */ - if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified && !force) { + if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified && + def->mem.source != VIR_DOMAIN_MEMORY_SOURCE_FILE && !force) { /* report back that using the new backend is not necessary * to achieve the desired configuration */ ret = 1; -- 2.47.2