Message ID | 20181126021720.19471-6-ming.lei@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | block: support multi-page bvec | expand |
On Mon, Nov 26, 2018 at 10:17:05AM +0800, Ming Lei wrote: > Commit 7759eb23fd980 ("block: remove bio_rewind_iter()") removes > bio_rewind_iter(), then no one uses bvec_iter_rewind() any more, > so remove it. > > Signed-off-by: Ming Lei <ming.lei@redhat.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
On Mon, Nov 26, 2018 at 10:17:05AM +0800, Ming Lei wrote: > Commit 7759eb23fd980 ("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> > Signed-off-by: Ming Lei <ming.lei@redhat.com> > --- > include/linux/bvec.h | 24 ------------------------ > 1 file changed, 24 deletions(-) > > diff --git a/include/linux/bvec.h b/include/linux/bvec.h > index 02c73c6aa805..ba0ae40e77c9 100644 > --- a/include/linux/bvec.h > +++ b/include/linux/bvec.h > @@ -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 && \ > -- > 2.9.5 >
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 02c73c6aa805..ba0ae40e77c9 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -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 && \
Commit 7759eb23fd980 ("block: remove bio_rewind_iter()") removes bio_rewind_iter(), then no one uses bvec_iter_rewind() any more, so remove it. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- include/linux/bvec.h | 24 ------------------------ 1 file changed, 24 deletions(-)