On Thu, 2014-02-27 at 13:48 -0800, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <davidl...@hp.com>
> diff --git a/mm/nommu.c b/mm/nommu.c
> index 8740213..95c2bd9 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c
> @@ -768,16 +768,23 @@ static void add_vma_to_mm(struct mm_struct *mm, struct 
> vm_area_struct *vma)
>   */
>  static void delete_vma_from_mm(struct vm_area_struct *vma)
>  {
> +     int i;
>       struct address_space *mapping;
>       struct mm_struct *mm = vma->vm_mm;
> +     struct task_struct *curr = current;
>  
>       kenter("%p", vma);
>  
>       protect_vma(vma, 0);
>  
>       mm->map_count--;
> -     if (mm->mmap_cache == vma)
> -             mm->mmap_cache = NULL;
> +     for (i = 0; i < VMACACHE_SIZE; i++) {
> +             /* if the vma is cached, invalidate the entire cache */
> +             if (curr->vmacache[i] == vma) {
> +                     vmacache_invalidate(mm);

*sigh* this should be curr->mm. 

Andrew, if there is no more feedback, do you want me to send another
patch for this or prefer fixing yourself for -mm? Assuming you'll take
it, of course.

Thanks,
Davidlohr

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to