@@ -240,11 +240,10 @@ struct bio_vec *bvec_alloc(gfp_t gfp_mask, int nr, unsigned long *idx,
return bvl;
}
-void bio_uninit(struct bio *bio)
+static void bio_uninit(struct bio *bio)
{
bio_disassociate_task(bio);
}
-EXPORT_SYMBOL(bio_uninit);
static void bio_free(struct bio *bio)
{
@@ -269,11 +268,6 @@ static void bio_free(struct bio *bio)
}
}
-/*
- * Users of this function have their own bio allocation. Subsequently,
- * they must remember to pair any call to bio_init() with bio_uninit()
- * when IO has completed, or when the bio is released.
- */
void bio_init(struct bio *bio, struct bio_vec *table,
unsigned short max_vecs)
{
@@ -264,9 +264,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
kfree(vecs);
if (unlikely(bio.bi_status))
- ret = blk_status_to_errno(bio.bi_status);
-
- bio_uninit(&bio);
+ return blk_status_to_errno(bio.bi_status);
return ret;
}
@@ -444,7 +444,6 @@ extern void bio_advance(struct bio *, unsigned);
extern void bio_init(struct bio *bio, struct bio_vec *table,
unsigned short max_vecs);
-extern void bio_uninit(struct bio *);
extern void bio_reset(struct bio *);
void bio_chain(struct bio *, struct bio *);