ext4: use pre-allocated es in __es_insert_extent()
authorBaokun Li <libaokun1@huawei.com>
Mon, 24 Apr 2023 03:38:38 +0000 (11:38 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Jun 2023 23:35:12 +0000 (19:35 -0400)
commit95f0b320339a977cf69872eac107122bf536775d
treef2faba53cb7e7ed6be07dd14b70c6cccf45180d7
parent73a2f033656be11298912201ad50615307b4477a
ext4: use pre-allocated es in __es_insert_extent()

Pass a extent_status pointer prealloc to __es_insert_extent(). If the
pointer is non-null, it is used directly when a new extent_status is
needed to avoid memory allocation failures.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-5-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.c