aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-04-24 11:38:39 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-06-26 19:35:12 -0400
commitbda3efaf774fb687c2b7a555aaec3006b14a8857 (patch)
treeb194af9de34dc7eb16e94b42518091b78f233558 /virt
parent95f0b320339a977cf69872eac107122bf536775d (diff)
ext4: use pre-allocated es in __es_remove_extent()
When splitting extent, if the second extent can not be dropped, we return -ENOMEM and use GFP_NOFAIL to preallocate an extent_status outside of i_es_lock and pass it to __es_remove_extent() to be used as the second extent. This ensures that __es_remove_extent() is executed successfully, thus ensuring consistency in the extent status tree. If the second extent is not undroppable, we simply drop it and return 0. Then retry is no longer necessary, remove it. Now, __es_remove_extent() will always remove what it should, maybe more. 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-6-libaokun1@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions