lkml.org 
[lkml]   [2010]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/28] mm: Make use of the anon_vma ref count
From
Date
On Wed, 2010-06-09 at 14:22 +0100, Mel Gorman wrote:
> This comment is no longer strictly correct. anon_vma_alloc() can also be
> called from anon_vma_fork where the root of the newly allocated anon_vma
> will be set to the same as the parents anon_vma. Maybe something like
>
> /*
> * Initialise the anon_vma root to point to itself. If called from
> * fork, the root will be reset to the parents anon_vma
> */

Sure, I'll change the comment.

> Else, just leave the initialisation of the root where it was but only
> init the refcount here.

Ah, that would lead to problems. We use put_anon_vma() to free in the
create error path, and __put_anon_vma() will also check the
anon_vma->root, so by not setting it the error path will explode.


\
 
 \ /
  Last update: 2010-06-09 15:35    [W:1.969 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site