diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-31 09:28:48 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-31 09:28:48 +0300 |
commit | 4e3386843325299df13069a1c94e27237b12be51 (patch) | |
tree | b1cf4c009b01eee0d017e3c01acc7a7495adcc46 /mm/shmem.c | |
parent | e59f3e5d4521cb95233e03ece48772e9161cbfd3 (diff) | |
parent | 5a2acbbb0179a7ffbb5440b9fa46689f619705ac (diff) | |
download | linux-4e3386843325299df13069a1c94e27237b12be51.tar.xz |
Merge tag 'kvmarm-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm64 updates for Linux 5.16
- More progress on the protected VM front, now with the full
fixed feature set as well as the limitation of some hypercalls
after initialisation.
- Cleanup of the RAZ/WI sysreg handling, which was pointlessly
complicated
- Fixes for the vgic placement in the IPA space, together with a
bunch of selftests
- More memcg accounting of the memory allocated on behalf of a guest
- Timer and vgic selftests
- Workarounds for the Apple M1 broken vgic implementation
- KConfig cleanups
- New kvmarm.mode=none option, for those who really dislike us
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 88742953532c..b5860f4a2738 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -490,9 +490,9 @@ bool shmem_is_huge(struct vm_area_struct *vma, case SHMEM_HUGE_ALWAYS: return true; case SHMEM_HUGE_WITHIN_SIZE: - index = round_up(index, HPAGE_PMD_NR); + index = round_up(index + 1, HPAGE_PMD_NR); i_size = round_up(i_size_read(inode), PAGE_SIZE); - if (i_size >= HPAGE_PMD_SIZE && (i_size >> PAGE_SHIFT) >= index) + if (i_size >> PAGE_SHIFT >= index) return true; fallthrough; case SHMEM_HUGE_ADVISE: |