Cleanup tracepoints in jmap.c
[ext4-patch-queue.git] / do-not-use-stripe-width-if-it-is-not-set
blobfb5dc26eaec3ab10363203e52caaf598676c685c
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>
10 ---
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
16 --- a/fs/ext4/super.c
17 +++ b/fs/ext4/super.c
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)
21                 ret = sbi->s_stripe;
22 -       else if (stripe_width <= sbi->s_blocks_per_group)
23 +       else if (stripe_width && stripe_width <= sbi->s_blocks_per_group)
24                 ret = stripe_width;
25 -       else if (stride <= sbi->s_blocks_per_group)
26 +       else if (stride && stride <= sbi->s_blocks_per_group)
27                 ret = stride;
28         else
29                 ret = 0;
30 -- 
31 2.10.2