git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
genalloc: fix allocation from end of pool
[sfrench/cifs-2.6.git]
/
lib
/
genalloc.c
diff --git
a/lib/genalloc.c
b/lib/genalloc.c
index 736c3b06398e522a7ad3d0ee846d77163436a334..1923f1490e72618b36756b326bbd2e280d71bd49 100644
(file)
--- a/
lib/genalloc.c
+++ b/
lib/genalloc.c
@@
-128,7
+128,6
@@
unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
end_bit = (chunk->end_addr - chunk->start_addr) >> order;
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
end_bit = (chunk->end_addr - chunk->start_addr) >> order;
- end_bit -= nbits + 1;
spin_lock_irqsave(&chunk->lock, flags);
start_bit = bitmap_find_next_zero_area(chunk->bits, end_bit, 0,
spin_lock_irqsave(&chunk->lock, flags);
start_bit = bitmap_find_next_zero_area(chunk->bits, end_bit, 0,