]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
block: remove zero_fill_bio_iter
authorChristoph Hellwig <hch@lst.de>
Fri, 15 May 2026 04:55:30 +0000 (06:55 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 May 2026 14:46:45 +0000 (08:46 -0600)
Only used to implement zero_fill_bio, so directly implement that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/bio.h

index b8972dba68a09060e29350972ea2271f39e82686..b990c453d72fe7814212451cfdd61458b3e3440f 100644 (file)
@@ -635,15 +635,15 @@ struct bio *bio_kmalloc(unsigned short nr_vecs, gfp_t gfp_mask)
 }
 EXPORT_SYMBOL(bio_kmalloc);
 
-void zero_fill_bio_iter(struct bio *bio, struct bvec_iter start)
+void zero_fill_bio(struct bio *bio)
 {
        struct bio_vec bv;
        struct bvec_iter iter;
 
-       __bio_for_each_segment(bv, bio, iter, start)
+       bio_for_each_segment(bv, bio, iter)
                memzero_bvec(&bv);
 }
-EXPORT_SYMBOL(zero_fill_bio_iter);
+EXPORT_SYMBOL(zero_fill_bio);
 
 /**
  * bio_truncate - truncate the bio to small size of @new_size
index 97d747320b35bc34197d026a53b611bf0c170530..84643fc0fb08d2cabc3e813c91434e97faf38c94 100644 (file)
@@ -482,13 +482,8 @@ 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_free_pages(struct bio *bio);
+void zero_fill_bio(struct bio *bio);
 void guard_bio_eod(struct bio *bio);
-void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter);
-
-static inline void zero_fill_bio(struct bio *bio)
-{
-       zero_fill_bio_iter(bio, bio->bi_iter);
-}
 
 static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
 {