diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 01:29:58 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 01:29:58 -0400 |
| commit | 7afe16c2bbf065e30d692423ad2c7e77c4cfe9a5 (patch) | |
| tree | 1a6b4e6a3ccbd5dcd462f1eaa05e349e9c9945f9 | |
| parent | 2084e0225ed14cc1959c8aa703a3870c95fde4ab (diff) | |
| parent | 041b62374c7fedc11a8a1eeda2868612d3d1436c (diff) | |
Merge commit 'v2.6.29-rc8' into tracing/ftrace
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | lib/bitmap.c | 16 |
2 files changed, 9 insertions, 9 deletions
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 2 | 1 | VERSION = 2 |
| 2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
| 3 | SUBLEVEL = 29 | 3 | SUBLEVEL = 29 |
| 4 | EXTRAVERSION = -rc7 | 4 | EXTRAVERSION = -rc8 |
| 5 | NAME = Erotic Pickled Herring | 5 | NAME = Erotic Pickled Herring |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/lib/bitmap.c b/lib/bitmap.c index 1338469ac849..35a1f7ff4149 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
| @@ -948,15 +948,15 @@ done: | |||
| 948 | */ | 948 | */ |
| 949 | int bitmap_find_free_region(unsigned long *bitmap, int bits, int order) | 949 | int bitmap_find_free_region(unsigned long *bitmap, int bits, int order) |
| 950 | { | 950 | { |
| 951 | int pos; /* scans bitmap by regions of size order */ | 951 | int pos, end; /* scans bitmap by regions of size order */ |
| 952 | 952 | ||
| 953 | for (pos = 0; pos < bits; pos += (1 << order)) | 953 | for (pos = 0 ; (end = pos + (1 << order)) <= bits; pos = end) { |
| 954 | if (__reg_op(bitmap, pos, order, REG_OP_ISFREE)) | 954 | if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE)) |
| 955 | break; | 955 | continue; |
| 956 | if (pos == bits) | 956 | __reg_op(bitmap, pos, order, REG_OP_ALLOC); |
| 957 | return -ENOMEM; | 957 | return pos; |
| 958 | __reg_op(bitmap, pos, order, REG_OP_ALLOC); | 958 | } |
| 959 | return pos; | 959 | return -ENOMEM; |
| 960 | } | 960 | } |
| 961 | EXPORT_SYMBOL(bitmap_find_free_region); | 961 | EXPORT_SYMBOL(bitmap_find_free_region); |
| 962 | 962 | ||
