mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
selftests/mm: test UFFDIO_ZEROPAGE only when !hugetlb
Make the check as simple as "test_type == TEST_HUGETLB" because that's the only mem that doesn't support ZEROPAGE. Link: https://lkml.kernel.org/r/20230412164234.328168-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com> Cc: David Hildenbrand <david@redhat.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Zach O'Keefe <zokeefe@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
366e93c465
commit
4af9ff2981
1 changed files with 1 additions and 1 deletions
|
@ -1118,7 +1118,7 @@ static int __uffdio_zeropage(int ufd, unsigned long offset, bool retry)
|
|||
{
|
||||
struct uffdio_zeropage uffdio_zeropage;
|
||||
int ret;
|
||||
bool has_zeropage = get_expected_ioctls(0) & (1 << _UFFDIO_ZEROPAGE);
|
||||
bool has_zeropage = !(test_type == TEST_HUGETLB);
|
||||
__s64 res;
|
||||
|
||||
if (offset >= nr_pages * page_size)
|
||||
|
|
Loading…
Reference in a new issue