Kemeng Shi bb0a12c343 ext4: avoid negative min_clusters in find_group_orlov()
min_clusters is signed integer and will be converted to unsigned
integer when compared with unsigned number stats.free_clusters.
If min_clusters is negative, it will be converted to a huge unsigned
value in which case all groups may not meet the actual desired free
clusters.
Set negative min_clusters to 0 to avoid unexpected behavior.

Fixes: ac27a0ec112a ("[PATCH] ext4: initial copy of files from ext3")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://patch.msgid.link/20240820132234.2759926-4-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2024-09-03 22:12:15 -04:00
..
2021-08-30 23:36:50 -04:00
2024-02-25 12:05:26 +01:00
2023-07-29 18:37:53 -04:00
2024-09-02 15:26:14 -04:00
2023-08-02 09:13:09 -06:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2024-08-26 23:52:02 -04:00