Skip to content
Commit fbb564a5 authored by wuchi's avatar wuchi Committed by Jens Axboe
Browse files

lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()



1. Getting next index before continue branch.
2. Checking free bits when setting the target bits. Otherwise,
it may reuse the busying bits.

Signed-off-by: default avatarwuchi <wuchi.zero@gmail.com>
Reviewed-by: default avatarMartin Wilck <mwilck@suse.com>
Link: https://lore.kernel.org/r/20220605145835.26916-1-wuchi.zero@gmail.com
Fixes: 9672b0d4

 ("sbitmap: add __sbitmap_queue_get_batch()")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e531485a
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