Skip to content

Commit 5741579

Browse files
committed
block: remove unused mp_bvec_last_segment
After commit 85a8ce6 ("block: add bio_truncate to fix guard_bio_eod") this function is unused, remove it. Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent c7d776f commit 5741579

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

include/linux/bvec.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,4 @@ static inline void bvec_advance(const struct bio_vec *bvec,
153153
}
154154
}
155155

156-
/*
157-
* Get the last single-page segment from the multi-page bvec and store it
158-
* in @seg
159-
*/
160-
static inline void mp_bvec_last_segment(const struct bio_vec *bvec,
161-
struct bio_vec *seg)
162-
{
163-
unsigned total = bvec->bv_offset + bvec->bv_len;
164-
unsigned last_page = (total - 1) / PAGE_SIZE;
165-
166-
seg->bv_page = bvec->bv_page + last_page;
167-
168-
/* the whole segment is inside the last page */
169-
if (bvec->bv_offset >= last_page * PAGE_SIZE) {
170-
seg->bv_offset = bvec->bv_offset % PAGE_SIZE;
171-
seg->bv_len = bvec->bv_len;
172-
} else {
173-
seg->bv_offset = 0;
174-
seg->bv_len = total - last_page * PAGE_SIZE;
175-
}
176-
}
177-
178156
#endif /* __LINUX_BVEC_ITER_H */

0 commit comments

Comments
 (0)