aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-02-10 00:56:09 -0500
committerTheodore Ts'o <tytso@mit.edu>2017-02-10 00:56:09 -0500
commit5469d7c3087ecaf760f54b447f11af6061b7c897 (patch)
treef8b3a6d61bc2720f11d7c8a21c12024c40274cd2
parentd9b22cf9f5466a057f2a4f1e642b469fa9d73117 (diff)
ext4: do not use stripe_width if it is not set
Avoid using stripe_width for sbi->s_stripe value if it is not actually set. It prevents using the stride for sbi->s_stripe. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3db5b6491513..dde14a7ac6d7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2637,9 +2637,9 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
2637 2637
2638 if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group) 2638 if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
2639 ret = sbi->s_stripe; 2639 ret = sbi->s_stripe;
2640 else if (stripe_width <= sbi->s_blocks_per_group) 2640 else if (stripe_width && stripe_width <= sbi->s_blocks_per_group)
2641 ret = stripe_width; 2641 ret = stripe_width;
2642 else if (stride <= sbi->s_blocks_per_group) 2642 else if (stride && stride <= sbi->s_blocks_per_group)
2643 ret = stride; 2643 ret = stride;
2644 else 2644 else
2645 ret = 0; 2645 ret = 0;