Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250896
b: refs/heads/master
c: 25aeeb0
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed May 25, 2011
1 parent 3e161ab commit 3e5d67d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d48ae45e72390ddf8cc5256ac32ed6f7a19cbea
refs/heads/master: 25aeeb046e695c3093a86aa9386128ffb3b1bc32
15 changes: 1 addition & 14 deletions trunk/include/linux/rmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,7 @@ int try_to_munlock(struct page *);
/*
* Called by memory-failure.c to kill processes.
*/
struct anon_vma *__page_lock_anon_vma(struct page *page);

static inline struct anon_vma *page_lock_anon_vma(struct page *page)
{
struct anon_vma *anon_vma;

__cond_lock(RCU, anon_vma = __page_lock_anon_vma(page));

/* (void) is needed to make gcc happy */
(void) __cond_lock(&anon_vma->root->lock, anon_vma);

return anon_vma;
}

struct anon_vma *page_lock_anon_vma(struct page *page);
void page_unlock_anon_vma(struct anon_vma *anon_vma);
int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma);

Expand Down
4 changes: 1 addition & 3 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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;
Expand Down Expand Up @@ -357,8 +357,6 @@ struct anon_vma *__page_lock_anon_vma(struct page *page)
}

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();
Expand Down

0 comments on commit 3e5d67d

Please sign in to comment.