diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-12-11 19:01:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 20:22:24 -0500 |
commit | cc33a303f1c155cf0147964586bb80fa732d8a21 (patch) | |
tree | 823c1707b3d527c6bf0190a81aa6ed732c3bfc5c /mm/highmem.c | |
parent | 4de22c0584fb0566487b2cba5cdfbce346b18402 (diff) |
mm, highmem: remove useless pool_lock
The pool_lock protects the page_address_pool from concurrent access. But,
access to the page_address_pool is already protected by kmap_lock. So
remove it.
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kin <minchan@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/highmem.c')
-rw-r--r-- | mm/highmem.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/mm/highmem.c b/mm/highmem.c index 2576a7118981..f0f0f1d5e691 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -328,7 +328,6 @@ struct page_address_map { | |||
328 | * page_address_map freelist, allocated from page_address_maps. | 328 | * page_address_map freelist, allocated from page_address_maps. |
329 | */ | 329 | */ |
330 | static struct list_head page_address_pool; /* freelist */ | 330 | static struct list_head page_address_pool; /* freelist */ |
331 | static spinlock_t pool_lock; /* protects page_address_pool */ | ||
332 | 331 | ||
333 | /* | 332 | /* |
334 | * Hash table bucket | 333 | * Hash table bucket |
@@ -395,11 +394,9 @@ void set_page_address(struct page *page, void *virtual) | |||
395 | if (virtual) { /* Add */ | 394 | if (virtual) { /* Add */ |
396 | BUG_ON(list_empty(&page_address_pool)); | 395 | BUG_ON(list_empty(&page_address_pool)); |
397 | 396 | ||
398 | spin_lock_irqsave(&pool_lock, flags); | ||
399 | pam = list_entry(page_address_pool.next, | 397 | pam = list_entry(page_address_pool.next, |
400 | struct page_address_map, list); | 398 | struct page_address_map, list); |
401 | list_del(&pam->list); | 399 | list_del(&pam->list); |
402 | spin_unlock_irqrestore(&pool_lock, flags); | ||
403 | 400 | ||
404 | pam->page = page; | 401 | pam->page = page; |
405 | pam->virtual = virtual; | 402 | pam->virtual = virtual; |
@@ -413,9 +410,7 @@ void set_page_address(struct page *page, void *virtual) | |||
413 | if (pam->page == page) { | 410 | if (pam->page == page) { |
414 | list_del(&pam->list); | 411 | list_del(&pam->list); |
415 | spin_unlock_irqrestore(&pas->lock, flags); | 412 | spin_unlock_irqrestore(&pas->lock, flags); |
416 | spin_lock_irqsave(&pool_lock, flags); | ||
417 | list_add_tail(&pam->list, &page_address_pool); | 413 | list_add_tail(&pam->list, &page_address_pool); |
418 | spin_unlock_irqrestore(&pool_lock, flags); | ||
419 | goto done; | 414 | goto done; |
420 | } | 415 | } |
421 | } | 416 | } |
@@ -438,7 +433,6 @@ void __init page_address_init(void) | |||
438 | INIT_LIST_HEAD(&page_address_htable[i].lh); | 433 | INIT_LIST_HEAD(&page_address_htable[i].lh); |
439 | spin_lock_init(&page_address_htable[i].lock); | 434 | spin_lock_init(&page_address_htable[i].lock); |
440 | } | 435 | } |
441 | spin_lock_init(&pool_lock); | ||
442 | } | 436 | } |
443 | 437 | ||
444 | #endif /* defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) */ | 438 | #endif /* defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) */ |