Skip to content
Commit d6c02a9b authored by Greg Edwards's avatar Greg Edwards Committed by Jens Axboe
Browse files

block: bvec_nr_vecs() returns value for wrong slab

In commit ed996a52 ("block: simplify and cleanup bvec pool
handling"), the value of the slab index is incremented by one in
bvec_alloc() after the allocation is done to indicate an index value of
0 does not need to be later freed.

bvec_nr_vecs() was not updated accordingly, and thus returns the wrong
value.  Decrement idx before performing the lookup.

Fixes: ed996a52

 ("block: simplify and cleanup bvec pool handling")
Signed-off-by: default avatarGreg Edwards <gedwards@ddn.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4884f8bf
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