From: Chengguang Xu Date: Sun, 20 Oct 2019 23:23:26 +0000 (+0800) Subject: ext2: adjust block num when retry allocation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=158be76c01172f4ffa3f10e2b4b433b3e496c75d;p=openwrt%2Fstaging%2Fblogic.git ext2: adjust block num when retry allocation Set block num to original *count in a case of retrying allocation in case num < *count Link: https://lore.kernel.org/r/20191020232326.84881-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara --- diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index e0cc55164505..924c1c765306 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -1404,6 +1404,7 @@ allocated: * use. So we may want to selectively mark some of the blocks * as free */ + num = *count; goto retry_alloc; }