Skip to content

Commit 1ed06c8

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent 510d766 commit 1ed06c8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

block/blk-map.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
283283
bio = blk_rq_map_bio_alloc(rq, nr_vecs, gfp_mask);
284284
if (!bio)
285285
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);
287291
if (ret)
288292
goto out_put;
289293
ret = blk_rq_append_bio(rq, bio);

include/linux/bio.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,6 @@ int bdev_rw_virt(struct block_device *bdev, sector_t sector, void *data,
449449
int bio_iov_iter_get_pages_aligned(struct bio *bio, struct iov_iter *iter,
450450
unsigned len_align_mask);
451451

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-
457452
void bio_iov_bvec_set(struct bio *bio, const struct iov_iter *iter);
458453
void __bio_release_pages(struct bio *bio, bool mark_dirty);
459454
extern void bio_set_pages_dirty(struct bio *bio);

0 commit comments

Comments
 (0)