From 158be76c01172f4ffa3f10e2b4b433b3e496c75d Mon Sep 17 00:00:00 2001 From: Chengguang Xu Date: Mon, 21 Oct 2019 07:23:26 +0800 Subject: [PATCH] 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 --- fs/ext2/balloc.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.30.2