Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83418
b: refs/heads/master
c: b324215
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and Linus Torvalds committed Feb 6, 2008
1 parent 9a0237f commit cd51c82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7ca2d41a029577a8cff453d1445951d4f96bfd8
refs/heads/master: b3242151906372f30f57feaa43b4cac96a23edb1
2 changes: 1 addition & 1 deletion trunk/include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#ifdef CONFIG_SMP

struct percpu_data {
void *ptrs[NR_CPUS];
void *ptrs[1];
};

#define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata)
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/allocpercpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(__percpu_populate_mask);
*/
void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
{
void *pdata = kzalloc(sizeof(struct percpu_data), gfp);
void *pdata = kzalloc(nr_cpu_ids * sizeof(void *), gfp);
void *__pdata = __percpu_disguise(pdata);

if (unlikely(!pdata))
Expand Down

0 comments on commit cd51c82

Please sign in to comment.