OSDN Git Service

block: turn the nr_iovecs argument to bio_alloc* into an unsigned short
authorChristoph Hellwig <hch@lst.de>
Tue, 2 Feb 2021 17:19:24 +0000 (18:19 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Feb 2021 15:33:16 +0000 (08:33 -0700)
commit0f2e6ab851ae146c468bc5151c302c6e2473f70a
tree740ef403c488f74f65f71b838df33970c4244433
parentde76fd893074ab2cea132c28ac9efd9d0434215e
block: turn the nr_iovecs argument to bio_alloc* into an unsigned short

The bi_max_vecs and bi_vcnt fields are defined as unsigned short, so
don't allow passing larger values in.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/bio.h