Commit 6581058f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slab: use NUMA_NO_NODE
  slab: remove one NR_CPUS dependency
parents fa9d594c eacbbae3
...@@ -3403,7 +3403,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, ...@@ -3403,7 +3403,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
cache_alloc_debugcheck_before(cachep, flags); cache_alloc_debugcheck_before(cachep, flags);
local_irq_save(save_flags); local_irq_save(save_flags);
if (nodeid == -1) if (nodeid == NUMA_NO_NODE)
nodeid = slab_node; nodeid = slab_node;
if (unlikely(!cachep->nodelists[nodeid])) { if (unlikely(!cachep->nodelists[nodeid])) {
...@@ -3934,7 +3934,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep, gfp_t gfp) ...@@ -3934,7 +3934,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep, gfp_t gfp)
struct ccupdate_struct { struct ccupdate_struct {
struct kmem_cache *cachep; struct kmem_cache *cachep;
struct array_cache *new[NR_CPUS]; struct array_cache *new[0];
}; };
static void do_ccupdate_local(void *info) static void do_ccupdate_local(void *info)
...@@ -3956,7 +3956,8 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, ...@@ -3956,7 +3956,8 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit,
struct ccupdate_struct *new; struct ccupdate_struct *new;
int i; int i;
new = kzalloc(sizeof(*new), gfp); new = kzalloc(sizeof(*new) + nr_cpu_ids * sizeof(struct array_cache *),
gfp);
if (!new) if (!new)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment