Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax
[platform/kernel/linux-starfive.git] / mm / madvise.c
index 9d80256..6cb1ca9 100644 (file)
@@ -96,7 +96,7 @@ static long madvise_behavior(struct vm_area_struct *vma,
                new_flags |= VM_DONTDUMP;
                break;
        case MADV_DODUMP:
-               if (new_flags & VM_SPECIAL) {
+               if (!is_vm_hugetlb_page(vma) && new_flags & VM_SPECIAL) {
                        error = -EINVAL;
                        goto out;
                }