Skip to content
Commit 30ef0e40 authored by Chengguang Xu's avatar Chengguang Xu Committed by Jan Kara
Browse files

ext2: don't set *count in the case of failure in ext2_try_to_allocate()

Currently we set *count to num(value 0) in the failure
of block allocation in ext2_try_to_allocate(). Without
reservation, we reuse *count(value 0) to retry block
allocation and wrong *count will cause only allocating
maximum 1 block even though having sufficent free blocks
in that block group. Finally, it probably cause significant
fragmentation.

Link: https://lore.kernel.org/r/20191026090721.23794-1-cgxu519@mykernel.net


Signed-off-by: default avatarChengguang Xu <cgxu519@mykernel.net>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 60e4cf67
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment