diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -935,7 +935,6 @@ static int transfer_objects(struct array_cache *to, | |||
935 | 935 | ||
936 | from->avail -= nr; | 936 | from->avail -= nr; |
937 | to->avail += nr; | 937 | to->avail += nr; |
938 | to->touched = 1; | ||
939 | return nr; | 938 | return nr; |
940 | } | 939 | } |
941 | 940 | ||
@@ -983,13 +982,11 @@ static struct array_cache **alloc_alien_cache(int node, int limit, gfp_t gfp) | |||
983 | 982 | ||
984 | if (limit > 1) | 983 | if (limit > 1) |
985 | limit = 12; | 984 | limit = 12; |
986 | ac_ptr = kmalloc_node(memsize, gfp, node); | 985 | ac_ptr = kzalloc_node(memsize, gfp, node); |
987 | if (ac_ptr) { | 986 | if (ac_ptr) { |
988 | for_each_node(i) { | 987 | for_each_node(i) { |
989 | if (i == node || !node_online(i)) { | 988 | if (i == node || !node_online(i)) |
990 | ac_ptr[i] = NULL; | ||
991 | continue; | 989 | continue; |
992 | } | ||
993 | ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp); | 990 | ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp); |
994 | if (!ac_ptr[i]) { | 991 | if (!ac_ptr[i]) { |
995 | for (i--; i >= 0; i--) | 992 | for (i--; i >= 0; i--) |
@@ -2963,8 +2960,10 @@ retry: | |||
2963 | spin_lock(&l3->list_lock); | 2960 | spin_lock(&l3->list_lock); |
2964 | 2961 | ||
2965 | /* See if we can refill from the shared array */ | 2962 | /* See if we can refill from the shared array */ |
2966 | if (l3->shared && transfer_objects(ac, l3->shared, batchcount)) | 2963 | if (l3->shared && transfer_objects(ac, l3->shared, batchcount)) { |
2964 | l3->shared->touched = 1; | ||
2967 | goto alloc_done; | 2965 | goto alloc_done; |
2966 | } | ||
2968 | 2967 | ||
2969 | while (batchcount > 0) { | 2968 | while (batchcount > 0) { |
2970 | struct list_head *entry; | 2969 | struct list_head *entry; |
@@ -3101,7 +3100,7 @@ static bool slab_should_failslab(struct kmem_cache *cachep, gfp_t flags) | |||
3101 | if (cachep == &cache_cache) | 3100 | if (cachep == &cache_cache) |
3102 | return false; | 3101 | return false; |
3103 | 3102 | ||
3104 | return should_failslab(obj_size(cachep), flags); | 3103 | return should_failslab(obj_size(cachep), flags, cachep->flags); |
3105 | } | 3104 | } |
3106 | 3105 | ||
3107 | static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags) | 3106 | static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags) |