ext4: make sure allocate pending entry not fail
__insert_pending() allocate memory in atomic context, so the allocation could fail, but we are not handling that failure now. It could lead ext4_es_remove_extent() to get wrong reserved clusters, and the global data blocks reservation count will be incorrect. The same to extents_status entry preallocation, preallocate pending entry out of the i_es_lock with __GFP_NOFAIL, make sure __insert_pending() and __revise_pending() always succeeds. Signed-off-by:Zhang Yi <yi.zhang@huawei.com> Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230824092619.1327976-3-yi.zhang@huaweicloud.com Reviewed-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
Loading
-
mentioned in commit d1769a4c
-
mentioned in commit 0cc76538
-
mentioned in commit 8234c1c6
-
mentioned in commit ec75d1d0
-
mentioned in commit 608758ef
-
mentioned in commit 5527898c
-
mentioned in commit 2ae2be6e
-
mentioned in commit fcb07d8e
-
mentioned in commit aa656803
-
mentioned in commit 10341e77
Please register or sign in to comment