aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-10-23 21:07:50 -0400
committerPekka Enberg <penberg@iki.fi>2013-10-24 13:17:34 -0400
commit7ecccf9d1e416fe61bb1caa0a94605b522feeaf3 (patch)
tree5261bed04e358b1bf9e84ff2ad050157d12edcad /mm/slab.c
parent8456a648cf44f14365f1f44de90a3da2526a4776 (diff)
slab: remove useless statement for checking pfmemalloc
Now, virt_to_page(page->s_mem) is same as the page, because slab use this structure for management. So remove useless statement. Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Pekka Enberg <penberg@iki.fi>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 0e7f2e73e08e..fbb594f2259a 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -750,9 +750,7 @@ static struct array_cache *alloc_arraycache(int node, int entries,
750 750
751static inline bool is_slab_pfmemalloc(struct page *page) 751static inline bool is_slab_pfmemalloc(struct page *page)
752{ 752{
753 struct page *mem_page = virt_to_page(page->s_mem); 753 return PageSlabPfmemalloc(page);
754
755 return PageSlabPfmemalloc(mem_page);
756} 754}
757 755
758/* Clears pfmemalloc_active if no slabs have pfmalloc set */ 756/* Clears pfmemalloc_active if no slabs have pfmalloc set */
@@ -817,7 +815,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac,
817 n = cachep->node[numa_mem_id()]; 815 n = cachep->node[numa_mem_id()];
818 if (!list_empty(&n->slabs_free) && force_refill) { 816 if (!list_empty(&n->slabs_free) && force_refill) {
819 struct page *page = virt_to_head_page(objp); 817 struct page *page = virt_to_head_page(objp);
820 ClearPageSlabPfmemalloc(virt_to_head_page(page->s_mem)); 818 ClearPageSlabPfmemalloc(page);
821 clear_obj_pfmemalloc(&objp); 819 clear_obj_pfmemalloc(&objp);
822 recheck_pfmemalloc_active(cachep, ac); 820 recheck_pfmemalloc_active(cachep, ac);
823 return objp; 821 return objp;
@@ -850,8 +848,7 @@ static void *__ac_put_obj(struct kmem_cache *cachep, struct array_cache *ac,
850 if (unlikely(pfmemalloc_active)) { 848 if (unlikely(pfmemalloc_active)) {
851 /* Some pfmemalloc slabs exist, check if this is one */ 849 /* Some pfmemalloc slabs exist, check if this is one */
852 struct page *page = virt_to_head_page(objp); 850 struct page *page = virt_to_head_page(objp);
853 struct page *mem_page = virt_to_head_page(page->s_mem); 851 if (PageSlabPfmemalloc(page))
854 if (PageSlabPfmemalloc(mem_page))
855 set_obj_pfmemalloc(&objp); 852 set_obj_pfmemalloc(&objp);
856 } 853 }
857 854