Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=debee0768ea1978c6efba03206a414685e4a9ed1
Commit:     debee0768ea1978c6efba03206a414685e4a9ed1
Parent:     71c42157904404a37f89fff3b2536c55115823a5
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 23 17:16:43 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Jun 24 08:59:12 2007 -0700

    slab allocators: MAX_ORDER one off fix
    
    MAX_ORDER is the first order that is not possible.
    
    Use MAX_ORDER - 1 to calculate the larges possible object size in slab.h
    
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/slab.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/slab.h b/include/linux/slab.h
index a015236..cebcd38 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -82,8 +82,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache 
*cachep,
  * to do various tricks to work around compiler limitations in order to
  * ensure proper constant folding.
  */
-#define KMALLOC_SHIFT_HIGH     ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \
-                               (MAX_ORDER + PAGE_SHIFT) : 25)
+#define KMALLOC_SHIFT_HIGH     ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \
+                               (MAX_ORDER + PAGE_SHIFT - 1) : 25)
 
 #define KMALLOC_MAX_SIZE       (1UL << KMALLOC_SHIFT_HIGH)
 #define KMALLOC_MAX_ORDER      (KMALLOC_SHIFT_HIGH - PAGE_SHIFT)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to