mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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>
This commit is contained in:
parent
38a72dac48
commit
45db54d58d
3 changed files with 62 additions and 42 deletions
|
@ -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 *,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue