提交 fe3c2b4c 编写于 作者: M Miaohe Lin 提交者: Paolo Bonzini

KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry()

When we reach here, we have desc->sptes[j] = NULL with j = 0.
So we can replace desc->sptes[0] with 0 to make it more clear.
Signed-off-by: NMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d29c03a5
......@@ -1414,7 +1414,7 @@ pte_list_desc_remove_entry(struct kvm_rmap_head *rmap_head,
if (j != 0)
return;
if (!prev_desc && !desc->more)
rmap_head->val = (unsigned long)desc->sptes[0];
rmap_head->val = 0;
else
if (prev_desc)
prev_desc->more = desc->more;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册