diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-01-10 17:54:07 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-01-10 17:54:07 +0100 |
commit | ff9cb1c4eead5e4c292e75cd3170a82d66944101 (patch) | |
tree | cdb132a39e550a9b7b28ea67544cb86cd6ebdb6e /fs/ext4/super.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff) | |
parent | ext4: fix undefined behavior in ext4_fill_flex_info() (diff) | |
download | linux-ff9cb1c4eead5e4c292e75cd3170a82d66944101.tar.xz linux-ff9cb1c4eead5e4c292e75cd3170a82d66944101.zip |
Merge branch 'for_linus' into for_linus_merged
Conflicts:
fs/ext4/ioctl.c
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ed3ce82e2de4..502c61fd7392 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1095,7 +1095,7 @@ static int ext4_show_options(struct seq_file *seq, struct dentry *root) } if (sbi->s_max_batch_time != EXT4_DEF_MAX_BATCH_TIME) { seq_printf(seq, ",max_batch_time=%u", - (unsigned) sbi->s_min_batch_time); + (unsigned) sbi->s_max_batch_time); } /* @@ -2005,17 +2005,16 @@ static int ext4_fill_flex_info(struct super_block *sb) struct ext4_group_desc *gdp = NULL; ext4_group_t flex_group_count; ext4_group_t flex_group; - int groups_per_flex = 0; + unsigned int groups_per_flex = 0; size_t size; int i; sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; - groups_per_flex = 1 << sbi->s_log_groups_per_flex; - - if (groups_per_flex < 2) { + if (sbi->s_log_groups_per_flex < 1 || sbi->s_log_groups_per_flex > 31) { sbi->s_log_groups_per_flex = 0; return 1; } + groups_per_flex = 1 << sbi->s_log_groups_per_flex; /* We allocate both existing and potentially added groups */ flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) + @@ -3506,7 +3505,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) * of the filesystem. */ if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) { - ext4_msg(sb, KERN_WARNING, "bad geometry: first data" + ext4_msg(sb, KERN_WARNING, "bad geometry: first data " "block %u is beyond end of filesystem (%llu)", le32_to_cpu(es->s_first_data_block), ext4_blocks_count(es)); |