block: rename bio_iov_iter_get_pages_aligned to bio_iov_iter_get_pages
Now that the bio_iov_iter_get_pages is free again, use it instead of the more complicated now. Also drop the unused export. 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>pull/1354/merge
parent
1ed06c8350
commit
82dd5d763c
|
|
@ -1316,7 +1316,7 @@ static int bio_iov_iter_align_down(struct bio *bio, struct iov_iter *iter,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bio_iov_iter_get_pages_aligned - add user or kernel pages to a bio
|
* bio_iov_iter_get_pages - add user or kernel pages to a bio
|
||||||
* @bio: bio to add pages to
|
* @bio: bio to add pages to
|
||||||
* @iter: iov iterator describing the region to be added
|
* @iter: iov iterator describing the region to be added
|
||||||
* @len_align_mask: the mask to align the total size to, 0 for any length
|
* @len_align_mask: the mask to align the total size to, 0 for any length
|
||||||
|
|
@ -1336,7 +1336,7 @@ static int bio_iov_iter_align_down(struct bio *bio, struct iov_iter *iter,
|
||||||
* MM encounters an error pinning the requested pages, it stops. Error
|
* MM encounters an error pinning the requested pages, it stops. Error
|
||||||
* is returned only if 0 pages could be pinned.
|
* is returned only if 0 pages could be pinned.
|
||||||
*/
|
*/
|
||||||
int bio_iov_iter_get_pages_aligned(struct bio *bio, struct iov_iter *iter,
|
int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,
|
||||||
unsigned len_align_mask)
|
unsigned len_align_mask)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
@ -1360,7 +1360,6 @@ int bio_iov_iter_get_pages_aligned(struct bio *bio, struct iov_iter *iter,
|
||||||
return bio_iov_iter_align_down(bio, iter, len_align_mask);
|
return bio_iov_iter_align_down(bio, iter, len_align_mask);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(bio_iov_iter_get_pages_aligned);
|
|
||||||
|
|
||||||
static void submit_bio_wait_endio(struct bio *bio)
|
static void submit_bio_wait_endio(struct bio *bio)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
|
||||||
* No alignment requirements on our part to support arbitrary
|
* No alignment requirements on our part to support arbitrary
|
||||||
* passthrough commands.
|
* passthrough commands.
|
||||||
*/
|
*/
|
||||||
ret = bio_iov_iter_get_pages_aligned(bio, iter, 0);
|
ret = bio_iov_iter_get_pages(bio, iter, 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_put;
|
goto out_put;
|
||||||
ret = blk_rq_append_bio(rq, bio);
|
ret = blk_rq_append_bio(rq, bio);
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,7 @@ int submit_bio_wait(struct bio *bio);
|
||||||
int bdev_rw_virt(struct block_device *bdev, sector_t sector, void *data,
|
int bdev_rw_virt(struct block_device *bdev, sector_t sector, void *data,
|
||||||
size_t len, enum req_op op);
|
size_t len, enum req_op op);
|
||||||
|
|
||||||
int bio_iov_iter_get_pages_aligned(struct bio *bio, struct iov_iter *iter,
|
int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter,
|
||||||
unsigned len_align_mask);
|
unsigned len_align_mask);
|
||||||
|
|
||||||
void bio_iov_bvec_set(struct bio *bio, const struct iov_iter *iter);
|
void bio_iov_bvec_set(struct bio *bio, const struct iov_iter *iter);
|
||||||
|
|
|
||||||
|
|
@ -1876,7 +1876,7 @@ static inline int bio_split_rw_at(struct bio *bio,
|
||||||
static inline int bio_iov_iter_get_bdev_pages(struct bio *bio,
|
static inline int bio_iov_iter_get_bdev_pages(struct bio *bio,
|
||||||
struct iov_iter *iter, struct block_device *bdev)
|
struct iov_iter *iter, struct block_device *bdev)
|
||||||
{
|
{
|
||||||
return bio_iov_iter_get_pages_aligned(bio, iter,
|
return bio_iov_iter_get_pages(bio, iter,
|
||||||
bdev_logical_block_size(bdev) - 1);
|
bdev_logical_block_size(bdev) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue