Skip to content
Commit 79e178f4 authored by Zhou Wang's avatar Zhou Wang Committed by Jens Axboe
Browse files

lib: scatterlist: Fix to support no mapped sg



In function sg_split, the second sg_calculate_split will return -EINVAL
when in_mapped_nents is 0.

Indeed there is no need to do second sg_calculate_split and sg_split_mapped
when in_mapped_nents is 0, as in_mapped_nents indicates no mapped entry in
original sgl.

Signed-off-by: default avatarZhou Wang <wangzhou1@hisilicon.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ba6f7da9
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