aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 811af03a14ef..c6854759bcf1 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -983,7 +983,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac,
983 } 983 }
984 984
985 /* The caller cannot use PFMEMALLOC objects, find another one */ 985 /* The caller cannot use PFMEMALLOC objects, find another one */
986 for (i = 1; i < ac->avail; i++) { 986 for (i = 0; i < ac->avail; i++) {
987 /* If a !PFMEMALLOC object is found, swap them */ 987 /* If a !PFMEMALLOC object is found, swap them */
988 if (!is_obj_pfmemalloc(ac->entry[i])) { 988 if (!is_obj_pfmemalloc(ac->entry[i])) {
989 objp = ac->entry[i]; 989 objp = ac->entry[i];
@@ -1000,7 +1000,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac,
1000 l3 = cachep->nodelists[numa_mem_id()]; 1000 l3 = cachep->nodelists[numa_mem_id()];
1001 if (!list_empty(&l3->slabs_free) && force_refill) { 1001 if (!list_empty(&l3->slabs_free) && force_refill) {
1002 struct slab *slabp = virt_to_slab(objp); 1002 struct slab *slabp = virt_to_slab(objp);
1003 ClearPageSlabPfmemalloc(virt_to_page(slabp->s_mem)); 1003 ClearPageSlabPfmemalloc(virt_to_head_page(slabp->s_mem));
1004 clear_obj_pfmemalloc(&objp); 1004 clear_obj_pfmemalloc(&objp);
1005 recheck_pfmemalloc_active(cachep, ac); 1005 recheck_pfmemalloc_active(cachep, ac);
1006 return objp; 1006 return objp;
@@ -1032,7 +1032,7 @@ static void *__ac_put_obj(struct kmem_cache *cachep, struct array_cache *ac,
1032{ 1032{
1033 if (unlikely(pfmemalloc_active)) { 1033 if (unlikely(pfmemalloc_active)) {
1034 /* Some pfmemalloc slabs exist, check if this is one */ 1034 /* Some pfmemalloc slabs exist, check if this is one */
1035 struct page *page = virt_to_page(objp); 1035 struct page *page = virt_to_head_page(objp);
1036 if (PageSlabPfmemalloc(page)) 1036 if (PageSlabPfmemalloc(page))
1037 set_obj_pfmemalloc(&objp); 1037 set_obj_pfmemalloc(&objp);
1038 } 1038 }