diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
commit | 5b805f2a7675634fbdf9ac1c9b2256905ab2ea68 (patch) | |
tree | ee00d1e3d757458d66209b926d274491c6c3f61c /mm/slob.c | |
parent | 1db1e31b1ee3ae126ef98f39083b5f213c7b41bf (diff) | |
parent | 201e72acb2d3821e2de9ce6091e98859c316b29a (diff) |
Merge branch 'cgroup/for-3.7-fixes' into cgroup/for-3.8
This is to receive device_cgroup fixes so that further device_cgroup
changes can be made in cgroup/for-3.8.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -429,7 +429,7 @@ static __always_inline void * | |||
429 | __do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller) | 429 | __do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller) |
430 | { | 430 | { |
431 | unsigned int *m; | 431 | unsigned int *m; |
432 | int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); | 432 | int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); |
433 | void *ret; | 433 | void *ret; |
434 | 434 | ||
435 | gfp &= gfp_allowed_mask; | 435 | gfp &= gfp_allowed_mask; |
@@ -502,7 +502,7 @@ void kfree(const void *block) | |||
502 | 502 | ||
503 | sp = virt_to_page(block); | 503 | sp = virt_to_page(block); |
504 | if (PageSlab(sp)) { | 504 | if (PageSlab(sp)) { |
505 | int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); | 505 | int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); |
506 | unsigned int *m = (unsigned int *)(block - align); | 506 | unsigned int *m = (unsigned int *)(block - align); |
507 | slob_free(m, *m + align); | 507 | slob_free(m, *m + align); |
508 | } else | 508 | } else |
@@ -521,7 +521,7 @@ size_t ksize(const void *block) | |||
521 | 521 | ||
522 | sp = virt_to_page(block); | 522 | sp = virt_to_page(block); |
523 | if (PageSlab(sp)) { | 523 | if (PageSlab(sp)) { |
524 | int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); | 524 | int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); |
525 | unsigned int *m = (unsigned int *)(block - align); | 525 | unsigned int *m = (unsigned int *)(block - align); |
526 | return SLOB_UNITS(*m) * SLOB_UNIT; | 526 | return SLOB_UNITS(*m) * SLOB_UNIT; |
527 | } else | 527 | } else |