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]
Message-ID: <fe670aff-461f-417f-a9b7-7b714e84b5e2@wanadoo.fr>
Date: Sat, 16 Nov 2024 17:54:52 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Rex Nie <rexnie3@...il.com>, ericvh@...nel.org, lucho@...kov.net,
 asmadeus@...ewreck.org, linux_oss@...debyte.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 9p/fs: Different branch return the same value

Le 16/11/2024 à 16:26, Rex Nie a écrit :
> The same code is executed when the condition ret < 0 is true or false.
> Remove the if branch and just return v9fs_init_inode_cache(). This
> does not change the semantics of the original code.
> 
> Signed-off-by: Rex Nie <rexnie3@...il.com>
> ---
>   fs/9p/v9fs.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index 281a1ed03a04..ee0a374e0d9d 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -661,12 +661,7 @@ static void v9fs_destroy_inode_cache(void)
>   
>   static int v9fs_cache_register(void)
>   {
> -	int ret;
> -
> -	ret = v9fs_init_inode_cache();
> -	if (ret < 0)
> -		return ret;
> -	return ret;
> +	return v9fs_init_inode_cache();
>   }
>   
>   static void v9fs_cache_unregister(void)

Hi,

a similar patch has already been sent.

See [1], which is the v2 of the patch and goes one step further.

CJ

[1]: 
https://lore.kernel.org/linux-kernel/20241107095756.10261-1-colin.i.king@gmail.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ