diff options
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index edff4055b32b..e7108105c50b 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -792,9 +792,9 @@ static int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
792 | if (!memslot->dirty_bitmap) | 792 | if (!memslot->dirty_bitmap) |
793 | goto out; | 793 | goto out; |
794 | 794 | ||
795 | n = ALIGN(memslot->npages, 8) / 8; | 795 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; |
796 | 796 | ||
797 | for (i = 0; !any && i < n; ++i) | 797 | for (i = 0; !any && i < n/sizeof(long); ++i) |
798 | any = memslot->dirty_bitmap[i]; | 798 | any = memslot->dirty_bitmap[i]; |
799 | 799 | ||
800 | r = -EFAULT; | 800 | r = -EFAULT; |