From patchwork Wed Oct 31 17:59:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10663103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4748C1751 for ; Wed, 31 Oct 2018 18:00:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 387B42B519 for ; Wed, 31 Oct 2018 18:00:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B02D2B4E5; Wed, 31 Oct 2018 18:00:13 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 98B762B4F8 for ; Wed, 31 Oct 2018 18:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730198AbeKAC7P (ORCPT ); Wed, 31 Oct 2018 22:59:15 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:37476 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730197AbeKAC7P (ORCPT ); Wed, 31 Oct 2018 22:59:15 -0400 Received: by mail-it1-f196.google.com with SMTP id e74-v6so19548941ita.2 for ; Wed, 31 Oct 2018 11:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yCZhbL3zeg/SKPm9VGLBjkkmJeH14YoKMn0JG7PoX0E=; b=DqLJVvXB0xlu46OJKUgMBSNVnbbcVBXlBk3VUOJpKM9cuhacB6zLCqRnfQxAWCwPd8 Lk08E/QwGPNTX1VfU5qQN9uipwR7H82xlB9osm+X7wRhIK2AhUvk7ZqLyUEh+I0C244i Ye1F6ZXFoipIpLPtNx3bzjjWNAab1q6R9dmfGROWRvlYxQ1VpaiI/h2vgH4fNibYPcGu bK+I6asIENhTJDCET4njbZlMmKAKs7fmT+FWh+VxZ1DTDLq3jKN5ATBi8migQy4OEDwv xNXxacZm2ZQtdUyRZrqeGdbKyXbx2ZCVJ+UarWZWqg+LeNG9oByrsMTX1GovErlpQqV3 lUrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yCZhbL3zeg/SKPm9VGLBjkkmJeH14YoKMn0JG7PoX0E=; b=kgpn8ZXd6XapFNCB8xVJ3go1ZsmU069qc83nUYYwDO3z1ZQTDpU2q2WetR+UtOXleK jWUWU/dXdDpqDrX4mra3wGzAwRbInHGVUUh0Lusp4K+cjZcDuXWMXZmPKR0WHXDm7PRZ C7ffGnQM/tpBZd5xAjdKvtnFHTWINH9DZAmdds9RgP3n9tywkgUkwsqJkl/UNRFZLkya 1SRXhTXbcDOa2ppf/8K6DKAhOYQW8Xdga1jvR4WCbF7SV/KwXVsZUR+DBIblCidPwXRd 3nEBLUYbIF1FuQ23/eSwPcYLenwb+ZZ00h3JQWq5D3SO03HES+0wmJ3mwkM5eBgxFthc MP2w== X-Gm-Message-State: AGRZ1gJ5Wjt7U+6jnGVmEPqsreA+m9gP5nEoAzKoEM7DNjrzMydM1xBP 5vTtpJisPG4CTbwIalS7Fg0qWA== X-Google-Smtp-Source: AJdET5fAC1Mdd4y7IeEMnpOZ0IEocln0YWTxLjXUjtjuJ1qhNb5I16TSwSouItPrImk4svqDMFWOBQ== X-Received: by 2002:a02:3b2c:: with SMTP id c44-v6mr3266286jaa.31.1541008810218; Wed, 31 Oct 2018 11:00:10 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 197-v6sm10982947iou.87.2018.10.31.11.00.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 11:00:09 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 22/30] block: remove __blk_put_request() Date: Wed, 31 Oct 2018 11:59:14 -0600 Message-Id: <20181031175922.8849-23-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031175922.8849-1-axboe@kernel.dk> References: <20181031175922.8849-1-axboe@kernel.dk> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now there's no difference between blk_put_request() and __blk_put_request() anymore, get rid of the underscore version and convert the few callers. Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe --- block/blk-core.c | 9 --------- block/blk-merge.c | 2 +- drivers/scsi/osd/osd_initiator.c | 4 ++-- drivers/scsi/osst.c | 2 +- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/sg.c | 2 +- drivers/scsi/st.c | 2 +- drivers/target/target_core_pscsi.c | 2 +- include/linux/blkdev.h | 1 - 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index da9e859cda4d..bffc80052948 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -800,15 +800,6 @@ void part_round_stats(struct request_queue *q, int cpu, struct hd_struct *part) } EXPORT_SYMBOL_GPL(part_round_stats); -void __blk_put_request(struct request_queue *q, struct request *req) -{ - if (unlikely(!q)) - return; - - blk_mq_free_request(req); -} -EXPORT_SYMBOL_GPL(__blk_put_request); - void blk_put_request(struct request *req) { blk_mq_free_request(req); diff --git a/block/blk-merge.c b/block/blk-merge.c index 5e4e30a88ced..7fedc0391610 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -839,7 +839,7 @@ int blk_attempt_req_merge(struct request_queue *q, struct request *rq, free = attempt_merge(q, rq, next); if (free) { - __blk_put_request(q, free); + blk_put_request(free); return 1; } diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index e19fa883376f..60cf7c5eb880 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -506,11 +506,11 @@ static void osd_request_async_done(struct request *req, blk_status_t error) _set_error_resid(or, req, error); if (req->next_rq) { - __blk_put_request(req->q, req->next_rq); + blk_put_request(req->next_rq); req->next_rq = NULL; } - __blk_put_request(req->q, req); + blk_put_request(req); or->request = NULL; or->in.req = NULL; or->out.req = NULL; diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 7a1a1edde35d..664c1238a87f 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -341,7 +341,7 @@ static void osst_end_async(struct request *req, blk_status_t status) blk_rq_unmap_user(SRpnt->bio); } - __blk_put_request(req->q, req); + blk_put_request(req); } /* osst_request memory management */ diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index fff128aa9ec2..dd338a8cd275 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1932,7 +1932,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) static void eh_lock_door_done(struct request *req, blk_status_t status) { - __blk_put_request(req->q, req); + blk_put_request(req); } /** diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c6ad00703c5b..4e27460ec926 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1390,7 +1390,7 @@ sg_rq_end_io(struct request *rq, blk_status_t status) */ srp->rq = NULL; scsi_req_free_cmd(scsi_req(rq)); - __blk_put_request(rq->q, rq); + blk_put_request(rq); write_lock_irqsave(&sfp->rq_list_lock, iflags); if (unlikely(srp->orphan)) { diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 307df2fa39a3..7ff22d3f03e3 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -530,7 +530,7 @@ static void st_scsi_execute_end(struct request *req, blk_status_t status) complete(SRpnt->waiting); blk_rq_unmap_user(tmp); - __blk_put_request(req->q, req); + blk_put_request(req); } static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 47d76c862014..c062d363dce3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1094,7 +1094,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) break; } - __blk_put_request(req->q, req); + blk_put_request(req); kfree(pt); } diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a9f6db8abcda..c502a7f40e84 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -906,7 +906,6 @@ extern blk_qc_t direct_make_request(struct bio *bio); extern void blk_rq_init(struct request_queue *q, struct request *rq); extern void blk_init_request_from_bio(struct request *req, struct bio *bio); extern void blk_put_request(struct request *); -extern void __blk_put_request(struct request_queue *, struct request *); extern struct request *blk_get_request(struct request_queue *, unsigned int op, blk_mq_req_flags_t flags); extern int blk_lld_busy(struct request_queue *q);