Skip to content

Commit

Permalink
block: remove bvec_iter_rewind()
Browse files Browse the repository at this point in the history
Commit 7759eb2 ("block: remove bio_rewind_iter()") removes
bio_rewind_iter(), then no one uses bvec_iter_rewind() any more,
so remove it.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Ming Lei authored and Jens Axboe committed Feb 15, 2019
1 parent 1a67356 commit 19d62f6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions include/linux/bvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,30 +92,6 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv,
return true;
}

static inline bool bvec_iter_rewind(const struct bio_vec *bv,
struct bvec_iter *iter,
unsigned int bytes)
{
while (bytes) {
unsigned len = min(bytes, iter->bi_bvec_done);

if (iter->bi_bvec_done == 0) {
if (WARN_ONCE(iter->bi_idx == 0,
"Attempted to rewind iter beyond "
"bvec's boundaries\n")) {
return false;
}
iter->bi_idx--;
iter->bi_bvec_done = __bvec_iter_bvec(bv, *iter)->bv_len;
continue;
}
bytes -= len;
iter->bi_size += len;
iter->bi_bvec_done -= len;
}
return true;
}

#define for_each_bvec(bvl, bio_vec, iter, start) \
for (iter = (start); \
(iter).bi_size && \
Expand Down

0 comments on commit 19d62f6

Please sign in to comment.