diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:43:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:43:21 -0400 |
commit | acbaa41a780490c791492c41144c774c04875af1 (patch) | |
tree | 31f1f046875eb071e2aed031e5d9d1584742314f /mm/slob.c | |
parent | 8d89adf44cf750e49691ba5b744b2ad77a05e997 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/quirks
Conflicts:
arch/x86/kernel/early-quirks.c
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -514,9 +514,11 @@ size_t ksize(const void *block) | |||
514 | return 0; | 514 | return 0; |
515 | 515 | ||
516 | sp = (struct slob_page *)virt_to_page(block); | 516 | sp = (struct slob_page *)virt_to_page(block); |
517 | if (slob_page(sp)) | 517 | if (slob_page(sp)) { |
518 | return ((slob_t *)block - 1)->units + SLOB_UNIT; | 518 | int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); |
519 | else | 519 | unsigned int *m = (unsigned int *)(block - align); |
520 | return SLOB_UNITS(*m) * SLOB_UNIT; | ||
521 | } else | ||
520 | return sp->page.private; | 522 | return sp->page.private; |
521 | } | 523 | } |
522 | 524 | ||