net/mlx4_en: Fix mixed PFC and Global pause user control requests
[pandora-kernel.git] / mm / mprotect.c
index 5a688a2..ac64860 100644 (file)
@@ -92,13 +92,15 @@ static inline void change_pmd_range(struct vm_area_struct *vma, pud_t *pud,
                        if (next - addr != HPAGE_PMD_SIZE)
                                split_huge_page_pmd(vma->vm_mm, pmd);
                        else if (change_huge_pmd(vma, pmd, addr, newprot))
-                               continue;
+                               goto next;
                        /* fall through */
                }
                if (pmd_none_or_clear_bad(pmd))
-                       continue;
+                       goto next;
                change_pte_range(vma->vm_mm, pmd, addr, next, newprot,
                                 dirty_accountable);
+next:
+               cond_resched();
        } while (pmd++, addr = next, addr != end);
 }