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: <E6C93199-73FE-46B0-9001-7D43D4FDEA26@dilger.ca>
Date:   Wed, 15 Apr 2020 12:15:24 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     xiakaixu1987@...il.com
Cc:     linux-ext4 <linux-ext4@...r.kernel.org>,
        Theodore Ts'o <tytso@....edu>, Kaixu Xia <kaixuxia@...cent.com>
Subject: Re: [PATCH] ext4: remove redundant variable has_bigalloc in
 ext4_fill_super

On Apr 15, 2020, at 1:25 AM, xiakaixu1987@...il.com wrote:
> 
> From: Kaixu Xia <kaixuxia@...cent.com>
> 
> We can use the ext4_has_feature_bigalloc() function directly to check
> bigalloc feature and the variable has_bigalloc is reduncant, so remove
> it.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> ---
> fs/ext4/super.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 855874ea4b29..60bb3991304e 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3681,7 +3681,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
> 	int blocksize, clustersize;
> 	unsigned int db_count;
> 	unsigned int i;
> -	int needs_recovery, has_huge_files, has_bigalloc;
> +	int needs_recovery, has_huge_files;
> 	__u64 blocks_count;
> 	int err = 0;
> 	unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
> @@ -4196,8 +4196,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
> 
> 	/* Handle clustersize */
> 	clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size);
> -	has_bigalloc = ext4_has_feature_bigalloc(sb);
> -	if (has_bigalloc) {
> +	if (ext4_has_feature_bigalloc(sb)) {
> 		if (clustersize < blocksize) {
> 			ext4_msg(sb, KERN_ERR,
> 				 "cluster size (%d) smaller than "
> --
> 2.20.0
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ