summaryrefslogtreecommitdiffstats
path: root/include/linux/bvec.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-11 08:23:30 +0200
committerJens Axboe <axboe@kernel.dk>2019-04-12 09:06:40 -0600
commit7321ecbfc7cf85211460a1dc6bb0ccfc3dcf9df0 (patch)
tree3e9df6be8ed3f3a6f965b0c28f937f54890e28eb /include/linux/bvec.h
parent14eacf12dbc75352fa746dfd9e24de3170ba5ff5 (diff)
downloadlinux-7321ecbfc7cf85211460a1dc6bb0ccfc3dcf9df0.tar.gz
linux-7321ecbfc7cf85211460a1dc6bb0ccfc3dcf9df0.tar.bz2
linux-7321ecbfc7cf85211460a1dc6bb0ccfc3dcf9df0.zip
block: change how we get page references in bio_iov_iter_get_pages
Instead of needing a special macro to iterate over all pages in a bvec just do a second passs over the whole bio. This also matches what we do on the release side. The release side helper is moved up to where we need the get helper to clearly express the symmetry. Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bvec.h')
-rw-r--r--include/linux/bvec.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index f6275c4da13a..307bbda62b7b 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -189,9 +189,4 @@ static inline void mp_bvec_last_segment(const struct bio_vec *bvec,
}
}
-#define mp_bvec_for_each_page(pg, bv, i) \
- for (i = (bv)->bv_offset / PAGE_SIZE; \
- (i <= (((bv)->bv_offset + (bv)->bv_len - 1) / PAGE_SIZE)) && \
- (pg = bvec_nth_page((bv)->bv_page, i)); i += 1)
-
#endif /* __LINUX_BVEC_ITER_H */