Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: remove bio_iov_iter_get_pages

Switch the only caller to bio_iov_iter_get_pages, and explain why it does
not have any alignment requirements.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
1ed06c83 510d7664

+5 -6
+5 -1
block/blk-map.c
··· 283 283 bio = blk_rq_map_bio_alloc(rq, nr_vecs, gfp_mask); 284 284 if (!bio) 285 285 return -ENOMEM; 286 - ret = bio_iov_iter_get_pages(bio, iter); 286 + /* 287 + * No alignment requirements on our part to support arbitrary 288 + * passthrough commands. 289 + */ 290 + ret = bio_iov_iter_get_pages_aligned(bio, iter, 0); 287 291 if (ret) 288 292 goto out_put; 289 293 ret = blk_rq_append_bio(rq, bio);
-5
include/linux/bio.h
··· 449 449 int bio_iov_iter_get_pages_aligned(struct bio *bio, struct iov_iter *iter, 450 450 unsigned len_align_mask); 451 451 452 - static inline int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) 453 - { 454 - return bio_iov_iter_get_pages_aligned(bio, iter, 0); 455 - } 456 - 457 452 void bio_iov_bvec_set(struct bio *bio, const struct iov_iter *iter); 458 453 void __bio_release_pages(struct bio *bio, bool mark_dirty); 459 454 extern void bio_set_pages_dirty(struct bio *bio);