From patchwork Tue Aug 7 22:51:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10559317 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 1292313AC for ; Tue, 7 Aug 2018 22:51:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0313B29E77 for ; Tue, 7 Aug 2018 22:51:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB68A2A6CC; Tue, 7 Aug 2018 22:51:47 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 6057F2A7E8 for ; Tue, 7 Aug 2018 22:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbeHHBIM (ORCPT ); Tue, 7 Aug 2018 21:08:12 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:3349 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbeHHBIM (ORCPT ); Tue, 7 Aug 2018 21:08:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1533682296; x=1565218296; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LOWjoWMhlCuY+I6iPLyiC/q8dG2OG2GO28yUPGx4zrc=; b=kkpr5Sq5TXTDGrpeLYbB9kR7L4Ba9syJoDv65JDlXAX012Y5fwkR+8+f eUkub5C/cPstYoFyfs6LzD07JGuM/aIZR25kHuAPStpzSV+HiXQ6Woez2 4DvdcCYUNNW5AcwJcnw9swInHWHRGHyyTmDZcMyHt+kyBFPUsGntrRGuA 5APUSwhhwxOuOqim0P+FLByEClcf1bzD3ko6ReA/bSU+KJ5T5Dd6dcjJ+ THEGJ5VDSxvCV1BeNr3FY+sgo8hWwhMVhT3/C8BhTarQfyDAo4O3bWXxr 7Ijfy1L+giY7KMI8v2e80Bpzh2nm2Ug1TGj548VCWjc7SU/pMvi6MRB22 Q==; X-IronPort-AV: E=Sophos;i="5.51,456,1526313600"; d="scan'208";a="88480454" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 08 Aug 2018 06:51:35 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 07 Aug 2018 15:39:14 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 07 Aug 2018 15:51:36 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Ming Lei , Jianchao Wang , Hannes Reinecke , Johannes Thumshirn , Alan Stern Subject: [PATCH v5 8/9] blk-mq: Insert a blk_pm_put_request() call Date: Tue, 7 Aug 2018 15:51:32 -0700 Message-Id: <20180807225133.27221-9-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807225133.27221-1-bart.vanassche@wdc.com> References: <20180807225133.27221-1-bart.vanassche@wdc.com> 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 Call blk_pm_put_request() after a request has finished. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei Cc: Jianchao Wang Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Alan Stern --- block/blk-mq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 434515018c43..6fb91b2b001c 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -37,6 +37,7 @@ #include "blk-pm.h" #include "blk-stat.h" #include "blk-mq-sched.h" +#include "blk-pm.h" #include "blk-rq-qos.h" static bool blk_mq_poll(struct request_queue *q, blk_qc_t cookie); @@ -478,6 +479,8 @@ static void __blk_mq_free_request(struct request *rq) struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, ctx->cpu); const int sched_tag = rq->internal_tag; + blk_pm_put_request(rq); + if (rq->tag != -1) blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag); if (sched_tag != -1)