smalloc: use SMALLOC_BPI instead of SMALLOC_BPB in add_pool()
authorVincent Fu <vincent.fu@wdc.com>
Tue, 3 Sep 2019 17:44:45 +0000 (13:44 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Sep 2019 18:32:01 +0000 (12:32 -0600)
commit4a479420d50eada0a7b9a972c529d75e2884732d
tree81f7c83c21a02616544a52053a5c7a6f99999fb2
parent247aa73ad08ff4c2202878e7e4f0485403c7e97e
smalloc: use SMALLOC_BPI instead of SMALLOC_BPB in add_pool()

Change the calculation of free_blocks in add_pool() to use SMALLOC_BPI
instead of SMALLOC_BPB. These two constants are coincidentally the same
on Linux and Windows but SMALLOC_BPI is the correct one to use.
free_blocks is the number of available blocks of size SMALLOC_BPB. It is
the product of the number of unsigned integers in the bitmap
(bitmap_blocks) and the number of bits per unsigned integer
(SMALLOC_BPI).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
smalloc.c