diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e4478b62d0f7..e83563b9ab32 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4703,6 +4703,8 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma, pages++; } spin_unlock(ptl); + + cond_resched(); } /* * Must flush TLB before releasing i_mmap_rwsem: x86's huge_pmd_unshare