Skip to content

Commit 19d62f6

Browse files
Ming Leiaxboe
authored andcommitted
block: remove bvec_iter_rewind()
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 1a67356 commit 19d62f6

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

include/linux/bvec.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,30 +92,6 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv,
9292
return true;
9393
}
9494

95-
static inline bool bvec_iter_rewind(const struct bio_vec *bv,
96-
struct bvec_iter *iter,
97-
unsigned int bytes)
98-
{
99-
while (bytes) {
100-
unsigned len = min(bytes, iter->bi_bvec_done);
101-
102-
if (iter->bi_bvec_done == 0) {
103-
if (WARN_ONCE(iter->bi_idx == 0,
104-
"Attempted to rewind iter beyond "
105-
"bvec's boundaries\n")) {
106-
return false;
107-
}
108-
iter->bi_idx--;
109-
iter->bi_bvec_done = __bvec_iter_bvec(bv, *iter)->bv_len;
110-
continue;
111-
}
112-
bytes -= len;
113-
iter->bi_size += len;
114-
iter->bi_bvec_done -= len;
115-
}
116-
return true;
117-
}
118-
11995
#define for_each_bvec(bvl, bio_vec, iter, start) \
12096
for (iter = (start); \
12197
(iter).bi_size && \

0 commit comments

Comments
 (0)