Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338745
b: refs/heads/master
c: cc33a30
h: refs/heads/master
i:
  338743: af4bbb9
v: v3
  • Loading branch information
Joonsoo Kim authored and Linus Torvalds committed Dec 12, 2012
1 parent f5b5fc8 commit 122a2ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 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: 4de22c0584fb0566487b2cba5cdfbce346b18402
refs/heads/master: cc33a303f1c155cf0147964586bb80fa732d8a21
6 changes: 0 additions & 6 deletions trunk/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ struct page_address_map {
* page_address_map freelist, allocated from page_address_maps.
*/
static struct list_head page_address_pool; /* freelist */
static spinlock_t pool_lock; /* protects page_address_pool */

/*
* Hash table bucket
Expand Down Expand Up @@ -395,11 +394,9 @@ void set_page_address(struct page *page, void *virtual)
if (virtual) { /* Add */
BUG_ON(list_empty(&page_address_pool));

spin_lock_irqsave(&pool_lock, flags);
pam = list_entry(page_address_pool.next,
struct page_address_map, list);
list_del(&pam->list);
spin_unlock_irqrestore(&pool_lock, flags);

pam->page = page;
pam->virtual = virtual;
Expand All @@ -413,9 +410,7 @@ void set_page_address(struct page *page, void *virtual)
if (pam->page == page) {
list_del(&pam->list);
spin_unlock_irqrestore(&pas->lock, flags);
spin_lock_irqsave(&pool_lock, flags);
list_add_tail(&pam->list, &page_address_pool);
spin_unlock_irqrestore(&pool_lock, flags);
goto done;
}
}
Expand All @@ -438,7 +433,6 @@ void __init page_address_init(void)
INIT_LIST_HEAD(&page_address_htable[i].lh);
spin_lock_init(&page_address_htable[i].lock);
}
spin_lock_init(&pool_lock);
}

#endif /* defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) */

0 comments on commit 122a2ae

Please sign in to comment.