Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1234702pxb; Fri, 22 Jan 2021 10:11:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnFPvUKK0H7ceDoFrblabycg8UJLdTzVkpfAhWCdXMVf5RdqhJC1SmeYbOvPOi3Z33C/Jx X-Received: by 2002:a17:906:e107:: with SMTP id gj7mr3595848ejb.298.1611339069044; Fri, 22 Jan 2021 10:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611339069; cv=none; d=google.com; s=arc-20160816; b=crajY4ojwrOzWyANlHAqkAVJe13ashJ6Y1oZbakqfN6WchtFpv774JgTTR0/haTpSn Phd0AT278tIwQqUAM9le66SpVinEGMSp/vOAtFSCjdS8Jta0O5fb8zO5Hl7gH/cjW/bN SYa+XClBysKS/i9nbpd6+Oc4OCfGy+oUHL9xzHoBnVsK3IbdEYq398Jgj1viPYUqw53B N9YE4KuYJmdzMxZNqvNkX9Lsa2T77DCpFwgwcOGW42IWLlmXqruGr9MbmI3sbAyXIW5v 282twyMlHuW1kv71wjiGk7ppwet2msljWiaNgVdmKMdOvxJtgRepYHicAJ7dLbtWOm4K 1I5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=qWKrm0PkZ0kQ49oyvU3ZSjfQaq6i2E/5XSqv2Aa41Dk=; b=jCNXXqrk3DjruXriywRRGfMRUGurSSbIjvxD8CHP8X58Jw8brvgebr8jjYdC6h2utx poQvvwe/RI72ku3ftStr+jN5vBEFF/c3eBXCRp6fN44n+yHZlBPtdcDaPA5TkvkU0RFZ neWHSp6cqPPy+hlIxnmx9gLLWd2v9ctBJps1i1qQCUC871eY7L/fYqR3qrIiFkW8Ek3v Mg/6TapxApS2QyK4bHdQB6zoIVj01TaagDse0qPxMRdKh8dAh28ZdaUMeDaKZIM2qlCY I3O+RFOGwG/STWFOQMICYoXWsPyMWkfCRplaLtHhpUE2npneyyIsdiWpNqkOL+n/FXrW /9kg== 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 v1si3324639ejj.430.2021.01.22.10.10.41; Fri, 22 Jan 2021 10:11:09 -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; 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 S1730046AbhAVSDh (ORCPT + 99 others); Fri, 22 Jan 2021 13:03:37 -0500 Received: from verein.lst.de ([213.95.11.211]:37638 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbhAVRvQ (ORCPT ); Fri, 22 Jan 2021 12:51:16 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 99C3A68B05; Fri, 22 Jan 2021 18:50:29 +0100 (CET) Date: Fri, 22 Jan 2021 18:50:29 +0100 From: Christoph Hellwig To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: Re: [PATCH] nvme-multipath: Early exit if no path is available Message-ID: <20210122175029.GA21127@lst.de> References: <20210122174125.145734-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210122174125.145734-1-dwagner@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2021 at 06:41:25PM +0100, Daniel Wagner wrote: > nvme_round_robin_path() should test if the return ns pointer is > valid. nvme_next_ns() will return a NULL pointer if there is no path > left. How can that happen once we're in the loop?