lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YS3Dcl9gV3x+ANFH@zeniv-ca.linux.org.uk>
Date:   Tue, 31 Aug 2021 05:51:46 +0000
From:   Joel Becker <jlbec@...lplan.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Sishuai Gong <sishuai@...due.edu>,
        Al Viro <viro@...iv.linux.org.uk>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/4] configfs: simplify the configfs_dirent_is_ready

Acked-by: Joel Becker <jlbec@...lplan.org>

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 <hch@....de>
> ---
>  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
> 

-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ