@@ -1121,7 +1121,7 @@ static int bio_copy_from_iter(struct bio *bio, struct iov_iter *iter)
struct bio_vec *bvec;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
ssize_t ret;
ret = copy_page_from_iter(bvec->bv_page,
@@ -1153,7 +1153,7 @@ static int bio_copy_to_iter(struct bio *bio, struct iov_iter iter)
struct bio_vec *bvec;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
ssize_t ret;
ret = copy_page_to_iter(bvec->bv_page,
@@ -1177,7 +1177,7 @@ void bio_free_pages(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
__free_page(bvec->bv_page);
}
EXPORT_SYMBOL(bio_free_pages);
@@ -1417,7 +1417,7 @@ struct bio *bio_map_user_iov(struct request_queue *q,
return bio;
out_unmap:
- bio_for_each_page_all2(bvec, bio, j, bia) {
+ bio_for_each_page_all(bvec, bio, j, bia) {
put_page(bvec->bv_page);
}
bio_put(bio);
@@ -1433,7 +1433,7 @@ static void __bio_unmap_user(struct bio *bio)
/*
* make sure we dirty pages we wrote to
*/
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
if (bio_data_dir(bio) == READ)
set_page_dirty_lock(bvec->bv_page);
@@ -1527,7 +1527,7 @@ static void bio_copy_kern_endio_read(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
memcpy(p, page_address(bvec->bv_page), bvec->bv_len);
p += bvec->bv_len;
}
@@ -1638,7 +1638,7 @@ void bio_set_pages_dirty(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
if (page && !PageCompound(page))
@@ -191,7 +191,7 @@ int blkdev_report_zones(struct block_device *bdev,
n = 0;
nz = 0;
nr_rep = 0;
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
if (!bv->bv_page)
break;
@@ -224,7 +224,7 @@ int blkdev_report_zones(struct block_device *bdev,
*nr_zones = nz;
out:
- bio_for_each_page_all2(bv, bio, i, bia)
+ bio_for_each_page_all(bv, bio, i, bia)
__free_page(bv->bv_page);
bio_put(bio);
@@ -148,7 +148,7 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool)
/*
* free up bounce indirect pages used
*/
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
orig_vec = bio_iter_iovec(bio_orig, orig_iter);
if (bvec->bv_page != orig_vec.bv_page) {
dec_zone_page_state(bvec->bv_page, NR_BOUNCE);
@@ -224,7 +224,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,
bio = bio_clone_bioset(*bio_orig, GFP_NOIO, passthrough ? NULL :
bounce_bio_set);
- bio_for_each_page_all2(to, bio, i, bia) {
+ bio_for_each_page_all(to, bio, i, bia) {
struct page *page = to->bv_page;
if (page_to_pfn(page) <= q->limits.bounce_pfn)
@@ -425,7 +425,7 @@ static void do_btree_node_write(struct btree *b)
void *base = (void *) ((unsigned long) i & ~(PAGE_SIZE - 1));
struct bvec_iter_all bia;
- bio_for_each_page_all2(bv, b->bio, j, bia)
+ bio_for_each_page_all(bv, b->bio, j, bia)
memcpy(page_address(bv->bv_page),
base + j * PAGE_SIZE, PAGE_SIZE);
@@ -1452,7 +1452,7 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
struct bio_vec *bv;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bv, clone, i, bia) {
+ bio_for_each_page_all(bv, clone, i, bia) {
BUG_ON(!bv->bv_page);
mempool_free(bv->bv_page, cc->page_pool);
}
@@ -2124,7 +2124,7 @@ static void process_checks(struct r1bio *r1_bio)
/* Now we can 'fixup' the error value */
sbio->bi_status = 0;
- bio_for_each_page_all2(bi, sbio, j, bia)
+ bio_for_each_page_all(bi, sbio, j, bia)
page_len[j] = bi->bv_len;
if (!status) {
@@ -243,7 +243,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
}
__set_current_state(TASK_RUNNING);
- bio_for_each_page_all2(bvec, &bio, i, bia) {
+ bio_for_each_page_all(bvec, &bio, i, bia) {
if (should_dirty && !PageCompound(bvec->bv_page))
set_page_dirty_lock(bvec->bv_page);
put_page(bvec->bv_page);
@@ -312,7 +312,7 @@ static void blkdev_bio_end_io(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
put_page(bvec->bv_page);
bio_put(bio);
}
@@ -173,7 +173,7 @@ static void end_compressed_bio_read(struct bio *bio)
* checked so the end_io handlers know about it
*/
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, cb->orig_bio, i, bia)
+ bio_for_each_page_all(bvec, cb->orig_bio, i, bia)
SetPageChecked(bvec->bv_page);
bio_endio(cb->orig_bio);
@@ -832,7 +832,7 @@ static blk_status_t btree_csum_one_bio(struct bio *bio)
struct bvec_iter_all bia;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
root = BTRFS_I(bvec->bv_page->mapping->host)->root;
ret = csum_dirty_buffer(root->fs_info, bvec->bv_page);
if (ret)
@@ -2459,7 +2459,7 @@ static void end_bio_extent_writepage(struct bio *bio)
struct bvec_iter_all bia;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
struct inode *inode = page->mapping->host;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
@@ -2531,7 +2531,7 @@ static void end_bio_extent_readpage(struct bio *bio)
struct bvec_iter_all bia;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
struct inode *inode = page->mapping->host;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
@@ -3686,7 +3686,7 @@ static void end_bio_extent_buffer_writepage(struct bio *bio)
struct bvec_iter_all bia;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
eb = (struct extent_buffer *)page->private;
@@ -7895,7 +7895,7 @@ static void btrfs_retry_endio_nocsum(struct bio *bio)
done->uptodate = 1;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
clean_io_failure(BTRFS_I(inode)->root->fs_info, failure_tree,
io_tree, done->start, bvec->bv_page,
btrfs_ino(BTRFS_I(inode)), 0);
@@ -7988,7 +7988,7 @@ static void btrfs_retry_endio(struct bio *bio)
failure_tree = &BTRFS_I(inode)->io_failure_tree;
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
ret = __readpage_endio_check(inode, io_bio, i, bvec->bv_page,
bvec->bv_offset, done->start,
bvec->bv_len);
@@ -1449,7 +1449,7 @@ static void set_bio_pages_uptodate(struct bio *bio)
ASSERT(!bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
SetPageUptodate(bvec->bv_page);
}
@@ -39,7 +39,7 @@ static void completion_pages(struct work_struct *work)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
struct page *page = bv->bv_page;
int ret = fscrypt_decrypt_page(page->mapping->host, page,
PAGE_SIZE, 0, page->index);
@@ -553,7 +553,7 @@ static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio)
} else {
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
if (dio->op == REQ_OP_READ && !PageCompound(page) &&
@@ -408,7 +408,7 @@ static void _clear_bio(struct bio *bio)
unsigned i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
unsigned this_count = bv->bv_len;
if (likely(PAGE_SIZE == this_count))
@@ -438,7 +438,7 @@ static void _mark_read4write_pages_uptodate(struct ore_io_state *ios, int ret)
if (!bio)
continue;
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
struct page *page = bv->bv_page;
SetPageUptodate(page);
@@ -65,7 +65,7 @@ static void ext4_finish_bio(struct bio *bio)
struct bio_vec *bvec;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
#ifdef CONFIG_EXT4_FS_ENCRYPTION
struct page *data_page = NULL;
@@ -82,7 +82,7 @@ static void mpage_end_io(struct bio *bio)
return;
}
}
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
struct page *page = bv->bv_page;
if (!bio->bi_status) {
@@ -72,7 +72,7 @@ static void f2fs_read_end_io(struct bio *bio)
}
}
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
if (!bio->bi_status) {
@@ -94,7 +94,7 @@ static void f2fs_write_end_io(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
enum count_type type = WB_DATA_TYPE(page);
@@ -277,7 +277,7 @@ static bool __has_merged_page(struct f2fs_bio_info *io,
if (!inode && !ino)
return true;
- bio_for_each_page_all2(bvec, io->bio, i, bia) {
+ bio_for_each_page_all(bvec, io->bio, i, bia) {
if (bvec->bv_page->mapping)
target = bvec->bv_page;
@@ -216,7 +216,7 @@ static void gfs2_end_log_write(struct bio *bio)
wake_up(&sdp->sd_logd_waitq);
}
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
page = bvec->bv_page;
if (page_has_buffers(page))
gfs2_end_log_write_bh(sdp, bvec, bio->bi_status);
@@ -192,7 +192,7 @@ static void gfs2_meta_read_endio(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia) {
+ bio_for_each_page_all(bvec, bio, i, bia) {
struct page *page = bvec->bv_page;
struct buffer_head *bh = page_buffers(page);
unsigned int len = bvec->bv_len;
@@ -819,7 +819,7 @@ static void iomap_dio_bio_end_io(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
put_page(bvec->bv_page);
bio_put(bio);
}
@@ -50,7 +50,7 @@ static void mpage_end_io(struct bio *bio)
int i;
struct bvec_iter_all bia;
- bio_for_each_page_all2(bv, bio, i, bia) {
+ bio_for_each_page_all(bv, bio, i, bia) {
struct page *page = bv->bv_page;
page_endio(page, op_is_write(bio_op(bio)),
blk_status_to_errno(bio->bi_status));
@@ -181,7 +181,7 @@ xfs_destroy_ioend(
next = bio->bi_private;
/* walk each page on bio, ending page IO on them */
- bio_for_each_page_all2(bvec, bio, i, bia)
+ bio_for_each_page_all(bvec, bio, i, bia)
xfs_finish_page_writeback(inode, bvec, error);
bio_put(bio);
@@ -236,7 +236,7 @@ static inline bool bio_rewind_iter(struct bio *bio, struct bvec_iter *iter,
* bio_for_each_segment_all() and make sure it is correctly used since
* bvec may points to one multipage bvec.
*/
-#define bio_for_each_page_all2(bvl, bio, i, bi) \
+#define bio_for_each_page_all(bvl, bio, i, bi) \
for ((bi).iter = BVEC_ITER_ALL_INIT, i = 0, bvl = &(bi).bv; \
(bi).iter.bi_idx < (bio)->bi_vcnt && \
(((bi).bv = bio_iter_iovec((bio), (bi).iter)), 1); \
@@ -372,7 +372,7 @@ static inline unsigned bio_pages_all(struct bio *bio)
WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED));
- bio_for_each_page_all2(bv, bio, i, bia)
+ bio_for_each_page_all(bv, bio, i, bia)
;
return i;
}
@@ -84,7 +84,7 @@ struct bvec_iter {
current bvec */
};
-/* this iter is only for implementing bio_for_each_page_all2() */
+/* this iter is only for implementing bio_for_each_page_all() */
struct bvec_iter_all {
struct bvec_iter iter;
struct bio_vec bv; /* in-flight singlepage bvec */
Now bio_for_each_page_all() is gone, we can reuse the name to iterate bio page by page, which is done via bio_for_each_page_all2() now. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- block/bio.c | 14 +++++++------- block/blk-zoned.c | 4 ++-- block/bounce.c | 4 ++-- drivers/md/bcache/btree.c | 2 +- drivers/md/dm-crypt.c | 2 +- drivers/md/raid1.c | 2 +- fs/block_dev.c | 4 ++-- fs/btrfs/compression.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/inode.c | 4 ++-- fs/btrfs/raid56.c | 2 +- fs/crypto/bio.c | 2 +- fs/direct-io.c | 2 +- fs/exofs/ore.c | 2 +- fs/exofs/ore_raid.c | 2 +- fs/ext4/page-io.c | 2 +- fs/ext4/readpage.c | 2 +- fs/f2fs/data.c | 6 +++--- fs/gfs2/lops.c | 2 +- fs/gfs2/meta_io.c | 2 +- fs/iomap.c | 2 +- fs/mpage.c | 2 +- fs/xfs/xfs_aops.c | 2 +- include/linux/bio.h | 4 ++-- include/linux/bvec.h | 2 +- 26 files changed, 41 insertions(+), 41 deletions(-)