Re: [PATCH v1 01/14] block: introduce bio_segments_all()

From: Christoph Hellwig
Date: Sat Feb 25 2017 - 13:22:35 EST


> +static inline unsigned bio_segments_all(struct bio *bio)
> +{
> + WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED));
> +
> + return bio->bi_vcnt;
> +}

I don't think this helpers really adds any benefit.