From: Shaohua Li <shli@xxxxxx> bio_uninit only calls bio_disassociate_task now. It's meaningless to have a wrap. Cc: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Shaohua Li <shli@xxxxxx> --- block/bio.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/block/bio.c b/block/bio.c index ce078fb..8773d1b 100644 --- a/block/bio.c +++ b/block/bio.c @@ -240,17 +240,12 @@ struct bio_vec *bvec_alloc(gfp_t gfp_mask, int nr, unsigned long *idx, return bvl; } -static void bio_uninit(struct bio *bio) -{ - bio_disassociate_task(bio); -} - static void bio_free(struct bio *bio) { struct bio_set *bs = bio->bi_pool; void *p; - bio_uninit(bio); + bio_disassociate_task(bio); if (bs) { bvec_free(bs->bvec_pool, bio->bi_io_vec, BVEC_POOL_IDX(bio)); @@ -294,7 +289,7 @@ void bio_reset(struct bio *bio) { unsigned long flags = bio->bi_flags & (~0UL << BIO_RESET_BITS); - bio_uninit(bio); + bio_disassociate_task(bio); memset(bio, 0, BIO_RESET_BYTES); bio->bi_flags = flags; @@ -1828,7 +1823,7 @@ void bio_endio(struct bio *bio) blk_throtl_bio_endio(bio); /* release cgroup info */ - bio_uninit(bio); + bio_disassociate_task(bio); if (bio->bi_end_io) bio->bi_end_io(bio); } -- 2.9.3