Re: [PATCH 35/46] hugetlb: add MADV_COLLAPSE for hugetlb

From: James Houghton
Date: Tue Jan 10 2023 - 15:04:35 EST


> +
> + if (curr < end) {
> + /* Don't hold the VMA lock for too long. */
> + hugetlb_vma_unlock_write(vma);
> + cond_resched();
> + hugetlb_vma_lock_write(vma);

I need to drop/reacquire the mapping lock here too (missed this when I
added the bits to grab the mapping lock in this function).