From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932339AbcIPIzE (ORCPT ); Fri, 16 Sep 2016 04:55:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757308AbcIPIwD (ORCPT ); Fri, 16 Sep 2016 04:52:03 -0400 From: Alexander Gordeev To: linux-kernel@vger.kernel.org Cc: Alexander Gordeev , Jens Axboe , linux-nvme@lists.infradead.org Subject: [PATCH 12/21] blk-mq: Uninit hardware context in order reverse to init Date: Fri, 16 Sep 2016 10:51:23 +0200 Message-Id: <7271ebd6abff4732d6eabb39d02e8e1519a6fa86.1474014910.git.agordeev@redhat.com> In-Reply-To: References: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 16 Sep 2016 08:51:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CC: Jens Axboe CC: linux-nvme@lists.infradead.org Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 9b1b6dc..f2bae1a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2013,12 +2013,13 @@ static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set, struct blk_mq_hw_ctx *hctx = hctxs[j]; if (hctx) { + kobject_put(&hctx->kobj); + if (hctx->tags) { blk_mq_free_rq_map(set, hctx->tags, j); set->tags[j] = NULL; } blk_mq_exit_hctx(q, set, hctx, j); - kobject_put(&hctx->kobj); hctxs[j] = NULL; } } -- 1.8.3.1