[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTin4DKGhcZ4=os1-NxrQ65pEDZ+USG1xpW54y4_T@mail.gmail.com>
Date: Mon, 27 Sep 2010 09:37:56 +0300
From: Pekka Enberg <penberg@...nel.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hugh@...itas.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 2/3] mm: Consolidate vma destruction into remove_vma.
Hi Eric,
On Sun, Sep 26, 2010 at 2:34 AM, Eric W. Biederman
<ebiederm@...ssion.com> wrote:
> Consolidate vma destruction in remove_vma. This is slightly
> better for code size and for code maintenance. Avoiding the pain
> of 3 copies of everything needed to tear down a vma.
>
> Signed-off-by: Eric W. Biederman <ebiederm@...stanetworks.com>
> ---
> mm/mmap.c | 21 +++++----------------
> 1 files changed, 5 insertions(+), 16 deletions(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 6128dc8..17dd003 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -643,16 +643,10 @@ again: remove_next = 1 + (end > next->vm_end);
> spin_unlock(&mapping->i_mmap_lock);
>
> if (remove_next) {
> - if (file) {
> - fput(file);
> - if (next->vm_flags & VM_EXECUTABLE)
> - removed_exe_file_vma(mm);
> - }
> if (next->anon_vma)
> anon_vma_merge(vma, next);
> + remove_vma(next);
remove_vma() does vma->vm_ops->close() but we don't do that here. Are
you sure the conversion is safe?
> mm->map_count--;
> - mpol_put(vma_policy(next));
> - kmem_cache_free(vm_area_cachep, next);
> /*
> * In mprotect's case 6 (see comments on vma_merge),
> * we must remove another next too. It would clutter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists