|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH] RAMBlock: use return value of ram_block_discard_require() as errno |
Date: | Tue, 16 Jul 2024 10:54:32 +0200 |
User-agent: | Mozilla Thunderbird |
On 16/7/24 08:42, Zhenzhong Duan wrote:
When ram_block_discard_require() fails, errno is passed to error_setg_errno(). It's a stale value or 0 which is unrelated to ram_block_discard_require(). As ram_block_discard_require() already returns -EBUSY in failure case, use it as errno for error_setg_errno(). Fixes: 852f0048f3ea ("make guest_memfd require uncoordinated discard") Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> --- system/physmem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> and queued, thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |