mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: introduce bvec_nth_page()
Single-page bvec can often be seen in small BS workloads, so introduce bvec_nth_page() for avoiding to call nth_page() unnecessarily, which looks not cheap. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
81214bab58
commit
4d633062c1
2 changed files with 9 additions and 4 deletions
|
|
@ -483,7 +483,7 @@ static unsigned blk_bvec_map_sg(struct request_queue *q,
|
|||
|
||||
offset = (total + bvec->bv_offset) % PAGE_SIZE;
|
||||
idx = (total + bvec->bv_offset) / PAGE_SIZE;
|
||||
pg = nth_page(bvec->bv_page, idx);
|
||||
pg = bvec_nth_page(bvec->bv_page, idx);
|
||||
|
||||
sg_set_page(*sg, pg, seg_size, offset);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue