mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
rmap: annotate lock context change on page_[un]lock_anon_vma()
The page_lock_anon_vma() conditionally grabs RCU and anon_vma lock but page_unlock_anon_vma() releases them unconditionally. This leads sparse to complain about context imbalance. Annotate them. Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1b36ba815b
commit
ea4525b600
2 changed files with 17 additions and 2 deletions
|
|
@ -314,7 +314,7 @@ void __init anon_vma_init(void)
|
|||
* Getting a lock on a stable anon_vma from a page off the LRU is
|
||||
* tricky: page_lock_anon_vma rely on RCU to guard against the races.
|
||||
*/
|
||||
struct anon_vma *page_lock_anon_vma(struct page *page)
|
||||
struct anon_vma *__page_lock_anon_vma(struct page *page)
|
||||
{
|
||||
struct anon_vma *anon_vma, *root_anon_vma;
|
||||
unsigned long anon_mapping;
|
||||
|
|
@ -348,6 +348,8 @@ out:
|
|||
}
|
||||
|
||||
void page_unlock_anon_vma(struct anon_vma *anon_vma)
|
||||
__releases(&anon_vma->root->lock)
|
||||
__releases(RCU)
|
||||
{
|
||||
anon_vma_unlock(anon_vma);
|
||||
rcu_read_unlock();
|
||||
|
|
|
|||
Loading…
Reference in a new issue