mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: spinlock tree_lock
mapping->tree_lock has no read lockers. convert the lock from an rwlock to a spinlock. Signed-off-by: Nick Piggin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Reviewed-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a60637c858
commit
19fd623127
12 changed files with 38 additions and 39 deletions
|
|
@ -369,13 +369,13 @@ int remove_exclusive_swap_page(struct page *page)
|
|||
retval = 0;
|
||||
if (p->swap_map[swp_offset(entry)] == 1) {
|
||||
/* Recheck the page count with the swapcache lock held.. */
|
||||
write_lock_irq(&swapper_space.tree_lock);
|
||||
spin_lock_irq(&swapper_space.tree_lock);
|
||||
if ((page_count(page) == 2) && !PageWriteback(page)) {
|
||||
__delete_from_swap_cache(page);
|
||||
SetPageDirty(page);
|
||||
retval = 1;
|
||||
}
|
||||
write_unlock_irq(&swapper_space.tree_lock);
|
||||
spin_unlock_irq(&swapper_space.tree_lock);
|
||||
}
|
||||
spin_unlock(&swap_lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue