]> git.baikalelectronics.ru Git - kernel.git/commit
bvec/iter: disallow zero-length segment bvecs
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 9 Jan 2021 16:02:58 +0000 (16:02 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 15:58:24 +0000 (08:58 -0700)
commit7d42bdba10adc003ac3edcaee499958e3a3dba52
tree7354e1e1321f6b8e1117fc77eb49f2c504006fee
parentd22ee4b382abb54291d46a29639a38275cc98cf5
bvec/iter: disallow zero-length segment bvecs

zero-length bvec segments are allowed in general, but not handled by bio
and down the block layer so filtered out. This inconsistency may be
confusing and prevent from optimisations. As zero-length segments are
useless and places that were generating them are patched, declare them
not allowed.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/block/biovecs.rst
Documentation/filesystems/porting.rst
lib/iov_iter.c