Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230827
b: refs/heads/master
c: fd4a466
h: refs/heads/master
i:
  230825: f14f3ac
  230823: fa216e8
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Jan 14, 2011
1 parent 1b8078d commit a7376ce
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 1ce82b69e96c838d007f316b8347b911fdfa9842
refs/heads/master: fd4a4663db293bfd5dc20fb4113977f62895e550
23 changes: 6 additions & 17 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
int rc = 0;
int *result = NULL;
struct page *new_hpage = get_new_page(hpage, private, &result);
int rcu_locked = 0;
struct anon_vma *anon_vma = NULL;

if (!new_hpage)
Expand All @@ -842,12 +841,10 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
}

if (PageAnon(hpage)) {
rcu_read_lock();
rcu_locked = 1;

if (page_mapped(hpage)) {
anon_vma = page_anon_vma(hpage);
atomic_inc(&anon_vma->external_refcount);
anon_vma = page_lock_anon_vma(hpage);
if (anon_vma) {
get_anon_vma(anon_vma);
page_unlock_anon_vma(anon_vma);
}
}

Expand All @@ -859,16 +856,8 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
if (rc)
remove_migration_ptes(hpage, hpage);

if (anon_vma && atomic_dec_and_lock(&anon_vma->external_refcount,
&anon_vma->lock)) {
int empty = list_empty(&anon_vma->head);
spin_unlock(&anon_vma->lock);
if (empty)
anon_vma_free(anon_vma);
}

if (rcu_locked)
rcu_read_unlock();
if (anon_vma)
drop_anon_vma(anon_vma);
out:
unlock_page(hpage);

Expand Down

0 comments on commit a7376ce

Please sign in to comment.