Instead of checking the dst_vma for two types, just check if the
continue pointer is null or not. This scales for all memory types.
Disable the anonymous continue operation by setting it to NULL in the
default uffd_ops.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
static const struct vm_uffd_ops default_uffd_ops = {
.copy = mfill_atomic_pte_copy,
.zeropage = mfill_atomic_pte_zeropage,
- .cont = mfill_atomic_pte_continue,
+ .cont = NULL,
.poison = mfill_atomic_pte_poison,
.is_dst_valid = uffd_def_is_dst_valid,
.increment = mfill_size,
goto out_unlock;
err = -EINVAL;
- if (!(vma_is_shmem(dst_vma) || is_vm_hugetlb_page(dst_vma)) &&
+ if (!uffd_ops->cont &&
uffd_flags_mode_is(flags, MFILL_ATOMIC_CONTINUE))
goto out_unlock;