mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
14eacf12db
commit
7321ecbfc7
2 changed files with 25 additions and 31 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue