|
@@ -3934,7 +3934,7 @@ fail:
|
|
|
|
|
|
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,
|
|
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;
|
|
|
|
|