Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp278344ybk; Tue, 12 May 2020 23:14:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLuA4jxusbFIIrRNGycEsLwT3LZo+qG4Sn2R+JlwWG29ov2RXQow+LTBKrkNAKe+UARUa0V X-Received: by 2002:aa7:c649:: with SMTP id z9mr21192919edr.288.1589350492146; Tue, 12 May 2020 23:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589350492; cv=none; d=google.com; s=arc-20160816; b=oNg/D8/dVKphJQVBSCmqQ7HalU9oZ31fTf/CHALkI+aVtu/4f/bDTggFUnzzI2YnKB c+2UmqL4F4mBMTQM00n/mT6t6k9361YAHxUkkzqzZptDBjpE+NPlr4RSg1ooKVggziD5 vabJnrtZqq+ll4zTp9iV7BOkLSx/xRbfP3s+o+D03eSypzOVG+xDPsEfOeuNa/IPktSr yhH1ohnzZ543XYIG9geaUReMx7VsHHdjD/7oOJJHMmk9crbmSChUUyZ+Tg6hOg8wH/S5 13GxNN4/dtPKdaksta1eD59qYt9n56/8DEOEtqvCfoO0pNleQrBUcz3b2Pk+EG0173f7 GuWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fnE2r/sjka9oPhDoEffhqDHWqxUkTpLOZlFiq5kRgcQ=; b=YoahgPnI4dduMcIqns0FSEzJ+Zq0dI8cKgVICuSggVd651brQsp3bQ/KPGmRFLGAoT M2c8MbYGMaHD1ohV4/ZQV/R7PVjHkXEWR2IvhA+mAikhlYUeq09VGALmPUJtjfD4JkMf 5VoYrziVZJ4wgw+Mew4wd1ss9xznnv/oPxNcWhOy2pMX/kIGNbFdY+0uEFeLBWJjXYsH NZfkQckTqQwCOUvCG+P/FiBhSag550fQ+pe/+d0tA4ZPP//ibkr3ujb5hbymO6SkKnun rm+3BFUJ02saxFUZou4hw4551juTc+LHS1bgS+G16KkaBc10DqwzGBMeWXs9hQmCB/yf fvEA== 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 dv9si2707346ejb.127.2020.05.12.23.14.28; Tue, 12 May 2020 23:14:52 -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 S1728854AbgEMGMh (ORCPT + 99 others); Wed, 13 May 2020 02:12:37 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37368 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728490AbgEMGMh (ORCPT ); Wed, 13 May 2020 02:12:37 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3CD743B0FF3190AF07B8; Wed, 13 May 2020 14:12:34 +0800 (CST) Received: from [127.0.0.1] (10.166.215.100) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Wed, 13 May 2020 14:12:24 +0800 Subject: Re: [PATCH] nvme/core:disable streams when get stream params failed To: Christoph Hellwig CC: , , , , , , References: <1588754221-661597-1-git-send-email-wubo40@huawei.com> <20200512160618.GA5403@lst.de> From: Wu Bo Message-ID: Date: Wed, 13 May 2020 14:12:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200512160618.GA5403@lst.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.166.215.100] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/13 0:06, Christoph Hellwig wrote: > On Wed, May 06, 2020 at 04:37:01PM +0800, Wu Bo wrote: >> After enable nvme streams, then if get stream params failed, >> We should disable streams before return error in >> nvme_configure_directives() function. >> >> Signed-off-by: Wu Bo >> --- >> drivers/nvme/host/core.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c >> index f2adea9..afe1f5a 100644 >> --- a/drivers/nvme/host/core.c >> +++ b/drivers/nvme/host/core.c >> @@ -552,8 +552,10 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl) >> return ret; >> >> ret = nvme_get_stream_params(ctrl, &s, NVME_NSID_ALL); >> - if (ret) >> + if (ret) { >> + nvme_disable_streams(ctrl); >> return ret; >> + } > > Please use a out_disable goto label to not duplicate the error > handling with the other case that needs it. > OK, I will modify it in the V2 patch. Thanks, Wu Bo > . >