lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [2/13] Make get_order(0) return 0
Date

This is needed for some followup patches. Some old drivers
(like xd.c) pass 0 to get_order and the compat wrapper for
the mask allocator doesn't like the resulting underflow.

Signed-off-by: Andi Kleen <ak@suse.de>

---
include/asm-generic/page.h | 3 +++
1 file changed, 3 insertions(+)
Index: linux/include/asm-generic/page.h
===================================================================
--- linux.orig/include/asm-generic/page.h
+++ linux/include/asm-generic/page.h
@@ -11,6 +11,9 @@ static __inline__ __attribute_const__ in
{
int order;

+ if (size == 0)
+ return 0;
+
size = (size - 1) >> (PAGE_SHIFT - 1);
order = -1;
do {

\
 
 \ /
  Last update: 2008-03-07 10:13    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site