Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4569109pxj; Wed, 12 May 2021 08:22:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBLY8KfLaci7yEbEwNjs9CWMV3V3c/kGohxEROmrZkuAWADfNOu36RlE22PFnvTgzt1PLA X-Received: by 2002:a17:907:3f08:: with SMTP id hq8mr37976654ejc.240.1620832954674; Wed, 12 May 2021 08:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620832954; cv=none; d=google.com; s=arc-20160816; b=PES0M4ozUrZeYt+AfupnteIqC0ug7fLrHg/j0GgWVMliZHuV9T/ELcdtoX+b06dZFm jEZtBCQYWF4TEcUg4HShNmoVs3E6/V5Dx5kcJwglhshbxlsxtnWDCcDXkHnzBK21RzXS GSX7kdCRxwh0RrW5EpuZUHkN0KP8NEfVfE7gFYQW+or+vfNm3YBk8JD67Wqj6xE7u9D7 l/ffreZRS7507rirFILN7GfaJbD5b3XVuCjh730geGv0GR7uVEFljmMscxx7zXywitW9 nZPHEJzynJ3Us+m6liFt5Os25ExGkoBQG4za8Fb3esJXxjzZg9162VhVU/ZAiBqJ+Vgx Nv+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=TqL6+CZrLd6hOAN3tbQlVjCVIGxeImAhmMu+yQaINV4=; b=n6ljK6rmXxSZVGc1q+fNqSieBy5akm8DAGkIjPpS0RhaQFa2OEGLLcUEz7WnRYrEs8 ylqF9JYnuTR9Q5VULvOVs5M2+ES4NWebpwZVVgxBGOuQ2neufJxUpgV6VPF5X/kWVfPO zWNDjdo+3wqKuWoFuRHRLxQNVTBNeVpVZCdOhprdsJDFNbjgi/oB5AetdRFK3uFlAtxf iaURkPBmtuM2mcE5eAQcSHQW9wGKFBI7BBx5OSkjuJZNBhZhL3/ElNFBChPWgriTokUv 6RnE7AdVlultbzBqokA7wNrktYcm9GwHjqrIh10F3ejrIj4Iv/G748ryOGagPaHhKXEC Wl7A== ARC-Authentication-Results: i=1; mx.google.com; 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 go43si209864ejc.620.2021.05.12.08.22.10; Wed, 12 May 2021 08:22:34 -0700 (PDT) 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; 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 S232910AbhELPWX (ORCPT + 99 others); Wed, 12 May 2021 11:22:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:37700 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbhELPKk (ORCPT ); Wed, 12 May 2021 11:10:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9741AAF80; Wed, 12 May 2021 15:09:31 +0000 (UTC) Subject: Re: [PATCH v1 4/8] block: move disk unregistration work from del_gendisk() to a helper To: Luis Chamberlain , axboe@kernel.dk Cc: bvanassche@acm.org, ming.lei@redhat.com, hch@infradead.org, jack@suse.cz, osandov@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210512064629.13899-1-mcgrof@kernel.org> <20210512064629.13899-5-mcgrof@kernel.org> From: Hannes Reinecke Message-ID: <282ddaaf-eee9-3b50-2b70-6cdba33a1931@suse.de> Date: Wed, 12 May 2021 17:09:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210512064629.13899-5-mcgrof@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/12/21 8:46 AM, Luis Chamberlain wrote: > There is quite a bit of code on del_gendisk() which relates to > unregistering the disk, using register_disk() as an counter. > Move all this code into a helper instead of re-writing our own, > which we'll need later to handle errors on add_disk(). > > Since disk unregistrationa also deals with parition unregistration, > provide a halper for that as well, as we'll later need this when > adding error handling for add_disk(). > > Signed-off-by: Luis Chamberlain > --- > block/genhd.c | 56 +++++++++++++++++++++++++++++---------------------- > 1 file changed, 32 insertions(+), 24 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer