Commit ff2beee
ext4: convert EXT4_B2C(sbi->s_stripe) users to EXT4_NUM_B2C
Although we have checks to make sure s_stripe is a multiple of cluster
size, in case we accidentally end up with a scenario where this is not
the case, use EXT4_NUM_B2C() so that we don't end up with unexpected
cases where EXT4_B2C(stripe) becomes 0.
Also make the is_stripe_aligned check in regular_allocator a bit more
robust while we are at it. This should ideally have no functional change
unless we have a bug somewhere causing (stripe % cluster_size != 0)
Reviewed-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://patch.msgid.link/e0c0a3b58a40935a1361f668851d041575861411.1725002410.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent ee85e09 commit ff2beee
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
2359 | | - | |
| 2359 | + | |
2360 | 2360 | | |
2361 | 2361 | | |
2362 | 2362 | | |
| |||
2553 | 2553 | | |
2554 | 2554 | | |
2555 | 2555 | | |
2556 | | - | |
| 2556 | + | |
2557 | 2557 | | |
2558 | 2558 | | |
2559 | 2559 | | |
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
2932 | 2934 | | |
2933 | | - | |
| 2935 | + | |
2934 | 2936 | | |
2935 | 2937 | | |
2936 | 2938 | | |
| |||
3706 | 3708 | | |
3707 | 3709 | | |
3708 | 3710 | | |
3709 | | - | |
| 3711 | + | |
3710 | 3712 | | |
3711 | 3713 | | |
3712 | 3714 | | |
| |||
0 commit comments