Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334641
b: refs/heads/master
c: baaf1dd
h: refs/heads/master
i:
  334639: 2d10802
v: v3
  • Loading branch information
Arnd Bergmann committed Oct 9, 2012
1 parent e022f30 commit fa2b17b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 48968177312e01737c018fdb2430b703831cbc2e
refs/heads/master: baaf1dd491433a78826150aff7411015de7e9b65
6 changes: 3 additions & 3 deletions trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ static void slob_free(void *block, int size)
void *__kmalloc_node(size_t size, gfp_t gfp, int node)
{
unsigned int *m;
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
void *ret;

gfp &= gfp_allowed_mask;
Expand Down Expand Up @@ -481,7 +481,7 @@ void kfree(const void *block)

sp = virt_to_page(block);
if (PageSlab(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
unsigned int *m = (unsigned int *)(block - align);
slob_free(m, *m + align);
} else
Expand All @@ -500,7 +500,7 @@ size_t ksize(const void *block)

sp = virt_to_page(block);
if (PageSlab(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
int align = max_t(size_t, ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
unsigned int *m = (unsigned int *)(block - align);
return SLOB_UNITS(*m) * SLOB_UNIT;
} else
Expand Down

0 comments on commit fa2b17b

Please sign in to comment.