mm: change direct call of spin_lock(anon_vma->lock) to inline function

Subsitute a direct call of spin_lock(anon_vma->lock) with an inline
function doing exactly the same.

This makes it easier to do the substitution to the root anon_vma lock in a
following patch.

We will deal with the handful of special locks (nested, dec_and_lock, etc)
separately.

Signed-off-by: Rik van Riel <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Tested-by: Larry Woodman <[email protected]>
Acked-by: Larry Woodman <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Rik van Riel 2010-08-09 17:18:38 -07:00 • committed by Linus Torvalds
commit cba48b98f2
5 changed files with 31 additions and 21 deletions

View file

@ -2593,7 +2593,7 @@ static void vm_unlock_anon_vma(struct anon_vma *anon_vma)
if (!__test_and_clear_bit(0, (unsigned long *)
&anon_vma->head.next))
BUG();
spin_unlock(&anon_vma->lock);
anon_vma_unlock(anon_vma);
}
}