1 ext4: do not use stripe_with if it is not set
3 From: Jan Kara <jack@suse.cz>
5 Avoid using stripe_width for sbi->s_stripe value if it is not actually
6 set. It prevents using the stride for sbi->s_stripe.
8 Signed-off-by: Jan Kara <jack@suse.cz>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 fs/ext4/super.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
14 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
15 index 66845a08a87a..b82cd3b263b4 100644
18 @@ -2619,9 +2619,9 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
20 if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
22 - else if (stripe_width <= sbi->s_blocks_per_group)
23 + else if (stripe_width && stripe_width <= sbi->s_blocks_per_group)
25 - else if (stride <= sbi->s_blocks_per_group)
26 + else if (stride && stride <= sbi->s_blocks_per_group)