/* Like __bio_clone, only also allocates the returned bio  */
struct bio* bio_clone(struct bio *bio, gfp_t gfp_mask)
/* Like __bio_clone, only also allocates the returned bio  */
struct bio* bio_clone(struct bio *bio, gfp_t gfp_mask)
{
	struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set);
	if (!b)
		return NULL;
	b->bi_destructor = bio_fs_destructor;
	__bio_clone(b, bio);
	if (bio_integrity(bio)) {
		int ret;
		ret = bio_integrity_clone(b, bio, gfp_mask, fs_bio_set);
		if (ret < 0) {
			bio_put(b);
			return NULL;
		}
	}
	return b;
}