Commit ef5fd681 authored by Kaixu Xia's avatar Kaixu Xia Committed by Theodore Ts'o

ext4: remove redundant variable has_bigalloc in ext4_fill_super

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: default avatarKaixu Xia <kaixuxia@tencent.com>
Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/1586935542-29588-1-git-send-email-kaixuxia@tencent.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 781c036b
...@@ -3679,7 +3679,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -3679,7 +3679,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
int blocksize, clustersize; int blocksize, clustersize;
unsigned int db_count; unsigned int db_count;
unsigned int i; unsigned int i;
int needs_recovery, has_huge_files, has_bigalloc; int needs_recovery, has_huge_files;
__u64 blocks_count; __u64 blocks_count;
int err = 0; int err = 0;
unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO; unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
...@@ -4194,8 +4194,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -4194,8 +4194,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
/* Handle clustersize */ /* Handle clustersize */
clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size); clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size);
has_bigalloc = ext4_has_feature_bigalloc(sb); if (ext4_has_feature_bigalloc(sb)) {
if (has_bigalloc) {
if (clustersize < blocksize) { if (clustersize < blocksize) {
ext4_msg(sb, KERN_ERR, ext4_msg(sb, KERN_ERR,
"cluster size (%d) smaller than " "cluster size (%d) smaller than "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment