]> www.infradead.org Git - users/willy/xarray.git/commit
ext4: refactor ext4_swap_extents() to reuse extents path
authorBaokun Li <libaokun1@huawei.com>
Thu, 22 Aug 2024 02:35:43 +0000 (10:35 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:12:18 +0000 (22:12 -0400)
commita2c613b8c4860d5e70010e7391fff727c5d96bab
tree2396ab85ce86a9287e8c001d959e03284fa1c057
parent4191eefef978d734fa8249bede3f9b02a85aa3c0
ext4: refactor ext4_swap_extents() to reuse extents path

The ext4_find_extent() can update the extent path so it doesn't have to
allocate and free path repeatedly, thus reducing the consumption of memory
allocation and freeing in ext4_swap_extents().

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/20240822023545.1994557-24-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c