From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17B5FC4320A for ; Tue, 31 Aug 2021 05:54:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3CDE6054E for ; Tue, 31 Aug 2021 05:54:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239231AbhHaFy4 (ORCPT ); Tue, 31 Aug 2021 01:54:56 -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 > --