Commit 7afe16c2 authored by Ingo Molnar's avatar Ingo Molnar

Merge commit 'v2.6.29-rc8' into tracing/ftrace

parents 2084e022 041b6237
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 29 SUBLEVEL = 29
EXTRAVERSION = -rc7 EXTRAVERSION = -rc8
NAME = Erotic Pickled Herring NAME = Erotic Pickled Herring
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -948,15 +948,15 @@ done: ...@@ -948,15 +948,15 @@ done:
*/ */
int bitmap_find_free_region(unsigned long *bitmap, int bits, int order) int bitmap_find_free_region(unsigned long *bitmap, int bits, int order)
{ {
int pos; /* scans bitmap by regions of size order */ int pos, end; /* scans bitmap by regions of size order */
for (pos = 0; pos < bits; pos += (1 << order)) for (pos = 0 ; (end = pos + (1 << order)) <= bits; pos = end) {
if (__reg_op(bitmap, pos, order, REG_OP_ISFREE)) if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
break; continue;
if (pos == bits)
return -ENOMEM;
__reg_op(bitmap, pos, order, REG_OP_ALLOC); __reg_op(bitmap, pos, order, REG_OP_ALLOC);
return pos; return pos;
}
return -ENOMEM;
} }
EXPORT_SYMBOL(bitmap_find_free_region); EXPORT_SYMBOL(bitmap_find_free_region);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment