diff options
author | Peter Zijlstra <peterz@infradead.org> | 2011-06-17 13:54:23 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-17 19:23:52 -0700 |
commit | eee2acbae95555006307395d8a6c91452d62851d (patch) | |
tree | 85b02243a07a5617ac45fe2d4a714e4f758f0a98 /drivers/video/metronomefb.c | |
parent | bb4aa39676f73b4657b3edd893ae83881c430c0c (diff) | |
download | blackbird-op-linux-eee2acbae95555006307395d8a6c91452d62851d.tar.gz blackbird-op-linux-eee2acbae95555006307395d8a6c91452d62851d.zip |
mm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas()
This matches the anon_vma_clone() case, and uses the same lock helper
functions. Because of the need to potentially release the anon_vma's,
it's a bit more complex, though.
We traverse the 'vma->anon_vma_chain' in two phases: the first loop gets
the anon_vma lock (with the helper function that only takes the lock
once for the whole loop), and removes any entries that don't need any
more processing.
The second phase just traverses the remaining list entries (without
holding the anon_vma lock), and does any actual freeing of the
anon_vma's that is required.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/metronomefb.c')
0 files changed, 0 insertions, 0 deletions