/* bio_integrity_mark_tail - Truncate bip_vec to be len bytes long @bip: Integrity vector to truncate @len: New length of integrity vector  */
void bio_integrity_mark_tail(struct bio_integrity_payload *bip, unsigned int len)
/* bio_integrity_mark_tail - Truncate bip_vec to be len bytes long @bip: Integrity vector to truncate @len: New length of integrity vector  */
void bio_integrity_mark_tail(struct bio_integrity_payload *bip, unsigned int len)
{
	struct bio_vec *iv;
	unsigned int i;
	bip_for_each_vec(iv, bip, i) {
		if (len == 0) {
			bip->bip_vcnt = i;
			return;
		} else if (len >= iv->bv_len) {
			len -= iv->bv_len;
		} else {
			iv->bv_len = len;
			len = 0;
		}
	}
}