Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: bvec_nr_vecs() returns value for wrong slab
[ Upstream commit d6c02a9 ] In commit ed996a5 ("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: ed996a5 ("block: simplify and cleanup bvec pool handling") Signed-off-by: Greg Edwards <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information