[PATCH 6.1 236/312] Revert "ext4: drop extent cache after doing PARTIAL_VALID1 zeroout"

Greg Kroah-Hartman
2026-04-08T18:16:59Z

This reverts commit 9e79460b3aae6bbf33f5ccea6c44bf2eefa45daf.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 30b0b25aac9ff..da7414e84ead8 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3304,16 +3304,8 @@ static struct ext4_ext_path *ext4_split_extent_at(handle_t *handle,
* extent length and ext4_split_extent() split will the
* first half again.
*/
- if (split_flag & EXT4_EXT_DATA_PARTIAL_VALID1) {
- /*
- * Drop extent cache to prevent stale unwritten
- * extents remaining after zeroing out.
- */
- ext4_es_remove_extent(inode,
- le32_to_cpu(zero_ex.ee_block),
- ext4_ext_get_actual_len(&zero_ex));
+ if (split_flag & EXT4_EXT_DATA_PARTIAL_VALID1)
goto fix_extent_len;
- }

/* update the extent length and mark as initialized */
ex->ee_len = cpu_to_le16(ee_len);
--
2.53.0