From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA4EDC433EF for ; Thu, 17 Feb 2022 07:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236267AbiBQHtA (ORCPT ); Thu, 17 Feb 2022 02:49:00 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbiBQHs7 (ORCPT ); Thu, 17 Feb 2022 02:48:59 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCCBB23A1BF; Wed, 16 Feb 2022 23:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KeoMC3QDwkILkdaaVYJOrxxk8FLYMhwewJ4WEEPcc7k=; b=RIgIYM9q2/MnwiQ3vnxgKWOrAo c0RqBVyDuXHGbVdlybtKyRmlodpXUkhbYGY6XaYZ3vx204mi1cVgUmDBMZpUvT3Xw1E1Za17p1N22 2YX8yyeAi/lBzDvHhFuYKqQNiQGAfWSkST/uhj3NEIqbIfokyvXUTx0YU93m/SnGc5zkf6Nc9g2Nf v+dFR7YhgtPiZ0Q3R2DtfTPwqg4vM95oPUjN7YN78AXdoiGLtHGP7HCYnVscckHxoWNNGH8ocvokG Z00LjzOlArCrAunL8hOTvIqwway3efTpc9I6gzplTFDB+X8MfGiPIe0LpZi6nP6ZWF+6u0WJJwNDd jjkUmD0Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKbWs-009GRt-Dx; Thu, 17 Feb 2022 07:48:42 +0000 Date: Wed, 16 Feb 2022 23:48:42 -0800 From: Christoph Hellwig To: "Wang Jianchao (Kuaishou)" Cc: Jens Axboe , hch@infradead.org, Bart Van Assche , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blk: do rq_qos_exit in blk_cleanup_queue Message-ID: References: <20220216113212.83000-1-jianchao.wan9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220216113212.83000-1-jianchao.wan9@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Feb 16, 2022 at 07:32:12PM +0800, Wang Jianchao (Kuaishou) wrote: > From: Wang Jianchao > > When __alloc_disk_node() failed, there will not not del_gendisk() > any more, then resource in rqos policies is leaked. Add rq_qos_exit() > into blk_cleanup_queue(). rqos is removed from the list, so needn't > to worry .exit is called twice. > > Fixes: commit 8e141f9eb803 ("block: drain file system I/O on del_gendisk") > Suggested-by: Bart Van Assche > Signed-off-by: Wang Jianchao Ming had a pending patch to move it into disk_release instead, which I think is the right place.