diff --git a/mm/mmap.c b/mm/mmap.c index bef2ef66eda66dc15ed6e5c07e38060812e3d89a..517239cea7d2bb78de81d99b3fcce4b2670bd730 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1951,8 +1951,12 @@ int vma_wants_writenotify(struct vm_area_struct *vma, pgprot_t vm_page_prot) pgprot_val(vm_pgprot_modify(vm_page_prot, vm_flags))) return 0; - /* Do we need to track softdirty? */ - if (IS_ENABLED(CONFIG_MEM_SOFT_DIRTY) && !(vm_flags & VM_SOFTDIRTY)) + /* + * Do we need to track softdirty? hugetlb does not support softdirty + * tracking yet. + */ + if (IS_ENABLED(CONFIG_MEM_SOFT_DIRTY) && !(vm_flags & VM_SOFTDIRTY) && + !is_vm_hugetlb_page(vma)) return 1; /* Specialty mapping? */