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: <20191119160501.GB2440@quack2.suse.cz>
Date:   Tue, 19 Nov 2019 17:05:01 +0100
From:   Jan Kara <jack@...e.cz>
To:     Chengguang Xu <cgxu519@...ernel.net>
Cc:     jack@...e.com, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2: code cleanup for descriptor_loc()

On Sat 16-11-19 06:49:00, Chengguang Xu wrote:
> Code cleanup by removing unnecessary variable
> in descriptor_loc().
> 
> Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>

Thanks! I've added the patch to my tree.

								Honza

> ---
>  fs/ext2/super.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 30c630d73f0f..bef607d5db28 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -806,7 +806,6 @@ static unsigned long descriptor_loc(struct super_block *sb,
>  {
>  	struct ext2_sb_info *sbi = EXT2_SB(sb);
>  	unsigned long bg, first_meta_bg;
> -	int has_super = 0;
>  	
>  	first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg);
>  
> @@ -814,10 +813,8 @@ static unsigned long descriptor_loc(struct super_block *sb,
>  	    nr < first_meta_bg)
>  		return (logic_sb_block + nr + 1);
>  	bg = sbi->s_desc_per_block * nr;
> -	if (ext2_bg_has_super(sb, bg))
> -		has_super = 1;
>  
> -	return ext2_group_first_block_no(sb, bg) + has_super;
> +	return ext2_group_first_block_no(sb, bg) + ext2_bg_has_super(sb, bg);
>  }
>  
>  static int ext2_fill_super(struct super_block *sb, void *data, int silent)
> -- 
> 2.21.0
> 
> 
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ