From patchwork Thu Oct 25 21:10:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656563 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 C2C2D15A7 for ; Thu, 25 Oct 2018 21:11:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7D662C64C for ; Thu, 25 Oct 2018 21:11:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACA412C652; Thu, 25 Oct 2018 21:11:32 +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=unavailable 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 2EA392C64C for ; Thu, 25 Oct 2018 21:11:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727551AbeJZFps (ORCPT ); Fri, 26 Oct 2018 01:45:48 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:54943 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727561AbeJZFps (ORCPT ); Fri, 26 Oct 2018 01:45:48 -0400 Received: by mail-it1-f196.google.com with SMTP id l191-v6so3337059ita.4 for ; Thu, 25 Oct 2018 14:11:29 -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=ou++Ms+/C+58+JISLpcfB0/IAxDd2ZlPEESNS5/NPb0=; b=ibdlAdcXK5bdvrOzKtlIIqDpZsw7zI66C+nYjMGWHV0r4hwY+6oIqjnwyY10ccdw37 DX89KaG22ndnd0QL5z2ey8k/4Bu06CslYMCvv9yyarAQjvKNNyXIR6XOkt57BllLXlgg Q1Fgtfe0MFdQxK2nPb1gUbz38srZixGT4AJYO82meufyfH/6BstazTbsH8+zJBZvB989 KN0rhAxC7qZUtyvm+APpOiYj/MMOrx1mU/TMkK2MkwtCErx/BhrtVQzo0nCbi7dT1Ma5 8+W25trlhV+T1gWp2+UQuvlsDAnjywyw9g+99aqoYGnR4F5fHFdwlHarZkf9a84ATHbV ox4w== 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=ou++Ms+/C+58+JISLpcfB0/IAxDd2ZlPEESNS5/NPb0=; b=CtL0CuJE9GGrs/cC2ntVLeQJuqAh43hSsQThzeYXQeLHiW9f/eh4lPFy4qI2uR/iwz cLB+FsEXeKs+9X/ZbJ20SbOiYcpe0R+u11vHN8XxHVnnHRHuZVRi5ULBtUDVUrw2gJ/v rdjFi1m90weaCFO0W6WB3Hs7+sn9LutE4dR9pkOUwdHFLWLh+dcQVubLZyYH30oSd7TR yyIsIz1n8l8uTMX8QGhRh8N545MO7m3q/1K5R7tkr7hqXkJixY/mb+qzgTOqi2aN1cnv 58Xel7JZ894ZAJKUk7YseheastHDv2Ts79hqI7NlYTPDEH9HiOIuXwKk0FigAgIKMNU/ RZYA== X-Gm-Message-State: AGRZ1gJXtGzqWIy8QQNPiCILRViNnZIeSQZSDftHYqnen4P2HZq+ZRrq 2ycsTNgpYG8bKVc4M8YLNJHwfyRpme5liA== X-Google-Smtp-Source: AJdET5ejZxmlPvpXl/jAGKQwO8pRPYPxCdW68obZxY//XBsU6bfozEP2GDpjZrke0lWnm5dWNURwew== X-Received: by 2002:a24:d204:: with SMTP id z4-v6mr601452itf.11.1540501888717; Thu, 25 Oct 2018 14:11:28 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e65-v6sm3446375ioa.76.2018.10.25.14.11.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:11:26 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 21/28] block: remove __blk_put_request() Date: Thu, 25 Oct 2018 15:10:32 -0600 Message-Id: <20181025211039.11559-22-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025211039.11559-1-axboe@kernel.dk> References: <20181025211039.11559-1-axboe@kernel.dk> 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 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. Signed-off-by: Jens Axboe Reviewed-by: Hannes Reinecke --- 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 009ac18cc7e1..ad79e8b09801 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 e87eeb47aac3..33a81cfde6a6 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -908,7 +908,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);