Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[linux-2.6-microblaze.git] / lib / genalloc.c
index 9a57257..00fc50d 100644 (file)
@@ -251,7 +251,7 @@ void gen_pool_destroy(struct gen_pool *pool)
                list_del(&chunk->next_chunk);
 
                end_bit = chunk_size(chunk) >> order;
-               bit = find_next_bit(chunk->bits, end_bit, 0);
+               bit = find_first_bit(chunk->bits, end_bit);
                BUG_ON(bit < end_bit);
 
                vfree(chunk);