aboutsummaryrefslogtreecommitdiff
path: root/samples/seccomp
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-04-24 11:38:40 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-06-26 19:35:12 -0400
commite9fe2b882bd5b26b987c9ba110c2222796f72af5 (patch)
treedf7a8aa8fe8b435d3f80032d1f0bf4d10423ac3d /samples/seccomp
parentbda3efaf774fb687c2b7a555aaec3006b14a8857 (diff)
ext4: using nofail preallocation in ext4_es_remove_extent()
If __es_remove_extent() returns an error it means that when splitting extent, allocating an extent that must be kept failed, where returning an error directly would cause the extent tree to be inconsistent. So we use GFP_NOFAIL to pre-allocate an extent_status and pass it to __es_remove_extent() to avoid this problem. In addition, since the allocated memory is outside the i_es_lock, the extent_status tree may change and the pre-allocated extent_status is no longer needed, so we release the pre-allocated extent_status when es->es_len is not initialized. 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-7-libaokun1@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'samples/seccomp')
0 files changed, 0 insertions, 0 deletions