Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75303
b: refs/heads/master
c: c51b1a1
h: refs/heads/master
i:
  75301: 9069650
  75299: 4a6fef5
  75295: 52538ef
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jan 9, 2008
1 parent 67fc3bf commit 0c95a50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 0f94e87cdeaaac9f0f9a28a5dd2a5070b87cd3e8
refs/heads/master: c51b1a160b63304720d49479986915e4c475a2cf
9 changes: 5 additions & 4 deletions trunk/mm/filemap_xip.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ static struct page *__xip_sparse_page;
static struct page *xip_sparse_page(void)
{
if (!__xip_sparse_page) {
unsigned long zeroes = get_zeroed_page(GFP_HIGHUSER);
if (zeroes) {
struct page *page = alloc_page(GFP_HIGHUSER | __GFP_ZERO);

if (page) {
static DEFINE_SPINLOCK(xip_alloc_lock);
spin_lock(&xip_alloc_lock);
if (!__xip_sparse_page)
__xip_sparse_page = virt_to_page(zeroes);
__xip_sparse_page = page;
else
free_page(zeroes);
__free_page(page);
spin_unlock(&xip_alloc_lock);
}
}
Expand Down

0 comments on commit 0c95a50

Please sign in to comment.