Messages in this thread | | | Subject | Re: [PATCH 10/28] mm: Make use of the anon_vma ref count | From | Peter Zijlstra <> | Date | Wed, 09 Jun 2010 15:32:27 +0200 |
| |
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.
| |