You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
kvm: update_memslots: clean flags for invalid memslots
Indeed, any invalid memslots should be new->npages = 0, new->base_gfn = 0 and new->flags = 0 at the same time. Signed-off-by: Tiejun Chen <tiejun.chen@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
128ca093cc
commit
b0165f1b41
@@ -675,6 +675,7 @@ static void update_memslots(struct kvm_memslots *slots,
|
||||
if (!new->npages) {
|
||||
WARN_ON(!mslots[i].npages);
|
||||
new->base_gfn = 0;
|
||||
new->flags = 0;
|
||||
if (mslots[i].npages)
|
||||
slots->used_slots--;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user