aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-05-08 21:33:54 -0400
committerJens Axboe <axboe@kernel.dk>2018-05-14 13:16:10 -0600
commit45db54d58de0b7171fe1f0d1dfc14378e464949e (patch)
tree7710877ae0fa69ef957a8087785fb1e7e0d1e06d /include/linux/bio.h
parentblock: Add bio_copy_data_iter(), zero_fill_bio_iter() (diff)
downloadlinux-dev-45db54d58de0b7171fe1f0d1dfc14378e464949e.tar.xz
linux-dev-45db54d58de0b7171fe1f0d1dfc14378e464949e.zip
block: Split out bio_list_copy_data()
Found a bug (with ASAN) where we were passing a bio to bio_copy_data() with bi_next not NULL, when it should have been - a driver had left bi_next set to something after calling bio_endio(). Since the normal case is only copying single bios, split out bio_list_copy_data() to avoid more bugs like this in the future. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 5a6ee955a8ac..98b175cc00d5 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -505,9 +505,10 @@ static inline void bio_flush_dcache_pages(struct bio *bi)
}
#endif
-extern void bio_copy_data_iter(struct bio *dst, struct bvec_iter dst_iter,
- struct bio *src, struct bvec_iter src_iter);
+extern void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter,
+ struct bio *src, struct bvec_iter *src_iter);
extern void bio_copy_data(struct bio *dst, struct bio *src);
+extern void bio_list_copy_data(struct bio *dst, struct bio *src);
extern void bio_free_pages(struct bio *bio);
extern struct bio *bio_copy_user_iov(struct request_queue *,