]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:31:23 +0000 (07:31 +0100)
commitb1995ba6269cbe0e20b01ab3cda2a1268d4e75b5
treede227ab7e63dce1650ee2775dcb2ca08407786e5
parentedec12712ae1cb69b5f21f7713c979b8d36a3dea
ext4: use pre-allocated es in __es_insert_extent()

[ Upstream commit 95f0b320339a977cf69872eac107122bf536775d ]

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>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/extents_status.c