Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2565343pxb; Sun, 5 Sep 2021 23:32:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1ojZkmZyNPz3JzgzCs04+WWgmteb36hpy4/gUiRW6W5ZOF/+VV8H2URvDaUr6hhIP6hT0 X-Received: by 2002:a05:6e02:1c86:: with SMTP id w6mr7225237ill.52.1630909979378; Sun, 05 Sep 2021 23:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630909979; cv=none; d=google.com; s=arc-20160816; b=TrdT0yw+Ynwci24yFwdTJvqy44zsNO5uRM1LjDDzJYwbGWhaqYk7GzTR2gppLN16pc Xk08wEvZO0yp1j+QzzdCd5s0eccr3izegJdebDCaVKD5kBBJ3e/18fAESVLhyjvDrdXY yqa6PqiwvfxgKULdlBzEEzslh2SnmZ9NRTnAPGL8NlB6u+nUWrIjJ2jOg8Xd/W5DzqNB kYeb8ngUGRreU1p6MdLLr5mJhcUTZXPqdwdrQutuCKmnSIRfUmxhhyaIzMGMvmRGmHcO 7m2lbRPStdhlS1grtbFljTio5I5Oycd8KRuh9E4iLy6HRZZYoJQd6jUdaVW3ouDWC689 clkg== 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:dkim-signature:dkim-signature; bh=reoGgBfdrxX+WdroZ7tTTbt30fzquMqmAzJ6Y/2VXxU=; b=HxykzKzLi4h5M1vTAddw2XJTztTuGIlVnf/QS+ODjCCpB0nIxeftsJX3zyMEIzbqDV D8U3HTrO9LAx0WHpjQI3Xvx8MjbOLh8qRe3DQbP0zvOQQKu+aTIJuMImn2YmL6Nc7lda jshMTff86T/2OoIoNHl6uxEpEAPnQdeEP+bI8QeO/UiaAPvLDEuHR1Q3C/gWSUjqpEd8 8nFQ5R5Cg8qDso3rKdhYqkAlX4C9at3Z4AJG2KGi4K0YRgIuzq9BZd30LzEbem3NGWw2 v8G/Q5aIPkJCSC0J6xggNCiscewRAPUQ5XnVQphasHzF4yqAswKZMkLetisuu1fEz8jK kNqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=equ7tgV6; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si4963694jad.70.2021.09.05.23.32.47; Sun, 05 Sep 2021 23:32:59 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=equ7tgV6; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239421AbhIFGSb (ORCPT + 99 others); Mon, 6 Sep 2021 02:18:31 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:52368 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbhIFGS3 (ORCPT ); Mon, 6 Sep 2021 02:18:29 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3732F20080; Mon, 6 Sep 2021 06:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1630909044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=reoGgBfdrxX+WdroZ7tTTbt30fzquMqmAzJ6Y/2VXxU=; b=equ7tgV6wynOZ3VAyoZBCGm2dpSJZL1LBJpEo0/cVL0LWiYVEsS58MeXnmH/o3o8mwB9bE Ohoi10Vfzkm7netncFCPeFZnmQW8lxcJ2ZKAXCBcKV24Og9bgWJBxYtFrXnaUgasQDCaAX EB5HP5uV8lZ45KFd/hgdqVOueLsFkNQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1630909044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=reoGgBfdrxX+WdroZ7tTTbt30fzquMqmAzJ6Y/2VXxU=; b=dtOJkJ75fx0ERSDI63nGCpqsK/1H2Libc+7N05NXdqxWVjbkLXIDSojSDAApItO8MMgOn/ +3faCkSAUlvoS4CQ== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 4D21A13299; Mon, 6 Sep 2021 06:17:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id 4SLJD3GyNWFnTwAAGKfGzw (envelope-from ); Mon, 06 Sep 2021 06:17:21 +0000 Subject: Re: [PATCH v3 5/8] md: add error handling support for add_disk() To: Luis Chamberlain , axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.ibm.com, kbusch@kernel.org, sagi@grimberg.me, adrian.hunter@intel.com, beanhuo@micron.com, ulf.hansson@linaro.org, avri.altman@wdc.com, swboyd@chromium.org, agk@redhat.com, snitzer@redhat.com, josef@toxicpanda.com Cc: hch@infradead.org, bvanassche@acm.org, ming.lei@redhat.com, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mmc@vger.kernel.org, dm-devel@redhat.com, nbd@other.debian.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig References: <20210830212538.148729-1-mcgrof@kernel.org> <20210830212538.148729-6-mcgrof@kernel.org> From: Hannes Reinecke Message-ID: Date: Mon, 6 Sep 2021 08:17:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210830212538.148729-6-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 8/30/21 11:25 PM, Luis Chamberlain wrote: > We never checked for errors on add_disk() as this function > returned void. Now that this is fixed, use the shiny new > error handling. > > We just do the unwinding of what was not done before, and are > sure to unlock prior to bailing. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Luis Chamberlain > --- > drivers/md/md.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > 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