From patchwork Wed Jul 12 18:00:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 9837215 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E55B0602D8 for ; Wed, 12 Jul 2017 18:01:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB9EF28654 for ; Wed, 12 Jul 2017 18:01:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D08192865E; Wed, 12 Jul 2017 18:01:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BEF128658 for ; Wed, 12 Jul 2017 18:01:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751002AbdGLSB1 (ORCPT ); Wed, 12 Jul 2017 14:01:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:52722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbdGLSB1 (ORCPT ); Wed, 12 Jul 2017 14:01:27 -0400 Received: from shli-virt.localdomain (unknown [199.201.64.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FDBC22C97; Wed, 12 Jul 2017 18:01:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FDBC22C97 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=shli@fb.com From: Shaohua Li To: linux-block@vger.kernel.org Cc: axboe@fb.com, Shaohua Li , Christoph Hellwig Subject: [PATCH 2/2] block: delete bio_uninit Date: Wed, 12 Jul 2017 11:00:53 -0700 Message-Id: <094050f349fdf7eed4a20335e9a7573d7c8c9b35.1499881589.git.shli@fb.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shaohua Li bio_uninit only calls bio_disassociate_task now. It's meaningless to have a wrap. Cc: Christoph Hellwig Signed-off-by: Shaohua Li --- 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); }