Commit 6c5bd55
ext4: modify the logic of ext4_mb_new_blocks_simple
commit 31a074a upstream.
For now in ext4_mb_new_blocks_simple, if we found a block which
should be excluded then will switch to next group, this may
probably cause 'group' run out of range.
Change to check next block in the same group when get a block should
be excluded. Also change the search range to EXT4_CLUSTERS_PER_GROUP
and add error checking.
Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20220110035141.1980-3-yinxin.x@bytedance.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8d71fc2 commit 6c5bd55
1 file changed
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5173 | 5173 | | |
5174 | 5174 | | |
5175 | 5175 | | |
5176 | | - | |
| 5176 | + | |
| 5177 | + | |
5177 | 5178 | | |
5178 | 5179 | | |
5179 | 5180 | | |
| |||
5195 | 5196 | | |
5196 | 5197 | | |
5197 | 5198 | | |
5198 | | - | |
| 5199 | + | |
| 5200 | + | |
5199 | 5201 | | |
| 5202 | + | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
| 5209 | + | |
5200 | 5210 | | |
5201 | | - | |
5202 | | - | |
5203 | | - | |
5204 | | - | |
5205 | | - | |
5206 | | - | |
| 5211 | + | |
| 5212 | + | |
5207 | 5213 | | |
5208 | 5214 | | |
5209 | | - | |
| 5215 | + | |
| 5216 | + | |
5210 | 5217 | | |
| 5218 | + | |
5211 | 5219 | | |
5212 | 5220 | | |
5213 | 5221 | | |
| |||
0 commit comments