Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp114138pxb; Wed, 20 Jan 2021 02:35:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwe1PLlF/9jh9QU1c1BPhZspF7jcWf81Y4qPgPZcl+kQ1ldsxj76eT491hVebFH2UlaeIDy X-Received: by 2002:aa7:c804:: with SMTP id a4mr4333473edt.297.1611138848929; Wed, 20 Jan 2021 02:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611138848; cv=none; d=google.com; s=arc-20160816; b=Cjc7Ody1lJD2vGtiKbUVNDhHmkkdBpXZ+DTl7VO8R+9rjijmRyYPuY6oFOvYihbmdB +cauQOvUF8i6qtDn40u89MieOiancVSF0kXb3E/Qx9Fj27LTOu9SUhMkb0eVaCppstPC n7AYnY3+vvpx46dCFhi7zpVds8SPl9Jlyx7YXTzkwAyv0/N0asL1HPNH8Gd7dzJa5sK5 YtO8utUH5m0dcu0IsdqCrxcjnj5D25Rk1oQepbeaYIPqoM+eFQNIZfyvHAO4jAjpld6r PsXhzdKoMgTqWQUg9gUQhRCzvA0qBW0wrydExCZr+DEu4O1cPEqXjH5bkWdYw1UBBAhT u6uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oB6bOagXwR+k0i3DKoNOg46fE73bVdDB9v4Xz01POuQ=; b=LbMmw+dsD5mcadbEagiSiSZ1mpNlPbOjf9mNUNTFpA1RMEDrQkn0l5Z3xYIvOplDT8 utxrhwqrwp+aZgs+S/QpujWiK0rEllQoNCzslBCOUbSWsk0gIYPqEr324NlSSVbO2h1+ ar9WxLzdryq9Itb9cg4HiQsERrU29BiRgnptQ/bxV/mlZMG6ydE9XXkHK53U3DtWkBJI kGZuDYgQAE8IvyxBaY3dcAfyT2PRO3ZyMFhJlw/wGt7KrpuC1iH3SxX+mcxDfo3w+oo0 sKOfjmpDZkTe6QP2GPsT2XdxQbvGGdlKcrCPY4C1P0uL5K5dNmJRvZmbrouWUS+tGv6q f2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EVNlUbvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si577350eji.61.2021.01.20.02.33.44; Wed, 20 Jan 2021 02:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EVNlUbvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732731AbhATKTi (ORCPT + 99 others); Wed, 20 Jan 2021 05:19:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728064AbhATKH5 (ORCPT ); Wed, 20 Jan 2021 05:07:57 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB7AC061757; Wed, 20 Jan 2021 02:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=oB6bOagXwR+k0i3DKoNOg46fE73bVdDB9v4Xz01POuQ=; b=EVNlUbvsyxqz5qg4y5PHqciTcs aJ3nFOgPgn673dOeTWK+YLdm6xtvRKr9Ctf/KsErx1ADRcoRYlKIAXeJD8DtsqNLlg+etbJSZS1+Z oPBYO6KZ5Q00Tk2k1soTqzThgCIOOHVICCyrMAEq+wpGbXHCzZTDVZX5nfMCyarG/JXkJlqmWDM0a BuGgQjFhk+lM5HXOPjdScBvBRSt+4tZHhGCCzAAC45Stng/h+fn8G+iP+VzD3uOUWW6igWgfbqjhr bY4tFIB835dX6SIYaVtr2iNePPRv7V74BKXOxFvZx69/MeaP64p82w/q7q+FOanKgnVZbAl31NfNK 9x/9IXzw==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l2AMy-00FVxQ-LR; Wed, 20 Jan 2021 10:05:51 +0000 Date: Wed, 20 Jan 2021 10:05:44 +0000 From: Christoph Hellwig To: Dinghao Liu Cc: kjlu@umn.edu, Jens Axboe , Jan Kara , Hannes Reinecke , Johannes Thumshirn , Ming Lei , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: Fix an error handling in add_partition Message-ID: <20210120100544.GC3694085@infradead.org> References: <20210117085023.24352-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210117085023.24352-1-dinghao.liu@zju.edu.cn> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 17, 2021 at 04:50:17PM +0800, Dinghao Liu wrote: > Once we have called device_initialize(), we should use put_device() to > give up the reference on error, just like what we have done on failure > of device_add(). > > Signed-off-by: Dinghao Liu Looks good, Reviewed-by: Christoph Hellwig