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] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 19:17:00 +0800
From:	Joseph Qi <joseph.qi@...wei.com>
To:	Daeseok Youn <daeseok.youn@...il.com>
CC:	<mfasheh@...e.com>, <akpm@...ux-foundation.org>,
	<ocfs2-devel@....oracle.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [Ocfs2-devel] [PATCH 4/4 RESEND] ocfs2: remove goto statement
 in ocfs2_check_dir_for_entry()

On 2015/2/28 7:53, Daeseok Youn wrote:
> Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>

Reviewed-by: Joseph Qi <joseph.qi@...wei.com>
> ---
> RESEND: this patch is rebased by 1/4.
> 
>  fs/ocfs2/dir.c |   13 +++++--------
>  1 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index c63f2b6..b3ab2a6 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -2043,22 +2043,19 @@ int ocfs2_check_dir_for_entry(struct inode *dir,
>  			      const char *name,
>  			      int namelen)
>  {
> -	int ret;
> +	int ret = 0;
>  	struct ocfs2_dir_lookup_result lookup = { NULL, };
>  
>  	trace_ocfs2_check_dir_for_entry(
>  		(unsigned long long)OCFS2_I(dir)->ip_blkno, namelen, name);
>  
> -	ret = -EEXIST;
> -	if (ocfs2_find_entry(name, namelen, dir, &lookup) == 0)
> -		goto bail;
> +	if (ocfs2_find_entry(name, namelen, dir, &lookup) == 0) {
> +		ret = -EEXIST;
> +		mlog_errno(ret);
> +	}
>  
> -	ret = 0;
> -bail:
>  	ocfs2_free_dir_lookup_result(&lookup);
>  
> -	if (ret)
> -		mlog_errno(ret);
>  	return ret;
>  }
>  
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ