summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-01-09 16:02:58 +0000
committerJens Axboe <axboe@kernel.dk>2021-01-25 08:58:24 -0700
commit9b2e0016d04c6542ace0128eb82ecb3b10c97e43 (patch)
tree7354e1e1321f6b8e1117fc77eb49f2c504006fee /lib
parent0f1d344feb534555a0dcd0beafb7211a37c5355e (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/iov_iter.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index a21e6a5792c5..6c597cdfcf5b 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -72,8 +72,6 @@
__start.bi_bvec_done = skip; \
__start.bi_idx = 0; \
for_each_bvec(__v, i->bvec, __bi, __start) { \
- if (!__v.bv_len) \
- continue; \
(void)(STEP); \
} \
}