block: don't allocate inline bvecs if this bioset needn't bvecs
authorMing Lei <ming.lei@redhat.com>
Mon, 11 Jan 2021 03:05:54 +0000 (11:05 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 04:22:45 +0000 (21:22 -0700)
commit9f180e315a93cde559ac1c9c4c5ce980aa681c1c
treea1469d03fead5c762d84d3b64f416fd34cd0aa33
parentc495a17679523c95f77f13697a71921dd5c224cd
block: don't allocate inline bvecs if this bioset needn't bvecs

The inline bvecs won't be used if user needn't bvecs by not passing
BIOSET_NEED_BVECS, so don't allocate bvecs in this situation.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Tested-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/bio.h