Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273227
b: refs/heads/master
c: e0d85a3
h: refs/heads/master
i:
  273225: d0112ad
  273223: c8c663e
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Nov 2, 2011
1 parent 8b03fe5 commit 92878dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0693bc9ce2cc4f6a1b9c3c05790fc149a74c0b87
refs/heads/master: e0d85a366c2300efd230ef82a9b22110b0658331
13 changes: 13 additions & 0 deletions trunk/arch/sparc/mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
#include <linux/rwsem.h>
#include <asm/pgtable.h>

static inline void get_huge_page_tail(struct page *page)
{
/*
* __split_huge_page_refcount() cannot run
* from under us.
*/
VM_BUG_ON(page_mapcount(page) < 0);
VM_BUG_ON(atomic_read(&page->_count) != 0);
atomic_inc(&page->_mapcount);
}

/*
* The performance critical leaf functions are made noinline otherwise gcc
* inlines everything into a single function which results in too much
Expand Down Expand Up @@ -56,6 +67,8 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
put_page(head);
return 0;
}
if (head != page)
get_huge_page_tail(page);

pages[*nr] = page;
(*nr)++;
Expand Down

0 comments on commit 92878dc

Please sign in to comment.