Messages in this thread Patch in this message | | | From | Andi Kleen <> | Subject | [PATCH] [2/13] Make get_order(0) return 0 | Date | Fri, 7 Mar 2008 10:07:12 +0100 (CET) |
| |
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 {
| |