Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4215469pxb; Mon, 30 Aug 2021 22:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc0CQCXLJGnD0tx18NdaBTK0USGxAKax2+PW7R3QBrB16lmlp02spv1/Uyk//VwPR837Vk X-Received: by 2002:a05:6602:26cb:: with SMTP id g11mr21529095ioo.110.1630389322780; Mon, 30 Aug 2021 22:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630389322; cv=none; d=google.com; s=arc-20160816; b=G9R1xqKfQcanrLbw4Ka9+ySe3XfPNZ1wfpA6BVtC2KVAALInFEABZvFA+NPsQYfPbO 3LwFmxbAi1y/iEncBwvYpyUod3+nKfARY35iWGSHDRvSjDYSFc2dPB5QxkVtei2IqVti iWcrjXJ5AGNGDyUtdODLBouDTqgCssaWhrtqB79+qWq4eaqbqiB7d/h7TXy52XXmTOpE E4ee2vhF/TtXKfX4u9VAKdixH0i/pUDpOtpvx6K9fskXBO4qVytmIaqnM/6JTqQQPGHG U9xu3HdC4TLwJLl4DOCVAn915fVbTb6LWMVmbE8PSey4vXti6fsMP+9fFJZaR9CEM1R6 vPZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=EdSLfuvGvjf1Htm9XmXK9pP3Lwowvw5TvGJP+Br86DM=; b=JEFAYs7sNH0Mr10+rMBAiiCdkuP0F6hDADGD5StsNyYmJS31AYd374MGFmV9Y4ILGK lJCSwRDBfcU1gcg+WDPHsnzlVnidQPkm0WqYAw3LYzQkiuN4en34mKE3mKvPIHlhawGM ThHci6eenRDOnJL6GidgOs2lYl4M30zUvzoXnpzEZFN1m1dS23fwwhXvFCwg4EBClci7 g4X1J2pca4FHxlDhnvThRv7SJp00Stl61XLxIrV4Y1vUBELOZxF4paxmd4BKaQbpj0ty D4GC+RAaugbS6sjpmE7m0LguObf9NHYZIr/ZtOqfnay+mPljz6M+1TNZPhBu9zyrQzEG eCPA== 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 1si8998799jav.1.2021.08.30.22.55.10; Mon, 30 Aug 2021 22:55:22 -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 S238882AbhHaFyz (ORCPT + 99 others); Tue, 31 Aug 2021 01:54:55 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:52354 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233873AbhHaFyz (ORCPT ); Tue, 31 Aug 2021 01:54:55 -0400 Received: from jlbec by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKwgU-00HUp2-OY; Tue, 31 Aug 2021 05:51:47 +0000 Date: Tue, 31 Aug 2021 05:51:46 +0000 From: Joel Becker To: Christoph Hellwig Cc: Sishuai Gong , Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/4] configfs: simplify the configfs_dirent_is_ready Message-ID: Mail-Followup-To: Christoph Hellwig , Sishuai Gong , Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20210825064906.1694233-1-hch@lst.de> <20210825064906.1694233-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210825064906.1694233-3-hch@lst.de> X-Burt-Line: Trees are cool. X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever come to perfection. Sender: Joel Becker Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Joel Becker On Wed, Aug 25, 2021 at 08:49:04AM +0200, Christoph Hellwig wrote: > Return the error directly instead of using a goto. > > Signed-off-by: Christoph Hellwig > --- > fs/configfs/dir.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c > index cf08bbde55f3..5d58569f0eea 100644 > --- a/fs/configfs/dir.c > +++ b/fs/configfs/dir.c > @@ -467,9 +467,8 @@ static struct dentry * configfs_lookup(struct inode *dir, > * not complete their initialization, since the dentries of the > * attributes won't be instantiated. > */ > - err = -ENOENT; > if (!configfs_dirent_is_ready(parent_sd)) > - goto out; > + return ERR_PTR(-ENOENT); > > list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { > if (sd->s_type & CONFIGFS_NOT_PINNED) { > @@ -493,7 +492,6 @@ static struct dentry * configfs_lookup(struct inode *dir, > return NULL; > } > > -out: > return ERR_PTR(err); > } > > -- > 2.30.2 > --