Commit 158be76c authored by Chengguang Xu's avatar Chengguang Xu Committed by Jan Kara

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.netSigned-off-by: default avatarChengguang Xu <cgxu519@mykernel.net>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent d02601c3
...@@ -1404,6 +1404,7 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, ...@@ -1404,6 +1404,7 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal,
* use. So we may want to selectively mark some of the blocks * use. So we may want to selectively mark some of the blocks
* as free * as free
*/ */
num = *count;
goto retry_alloc; goto retry_alloc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment