From 3910b513fcdf33030798755c722174ef4a827d2a Mon Sep 17 00:00:00 2001 From: Shida Zhang Date: Fri, 30 Aug 2024 13:37:36 +0800 Subject: [PATCH] ext4: persist the new uptodate buffers in ext4_journalled_zero_new_buffers For new uptodate buffers we also need to call write_end_fn() to persist the uptodate content, similarly as folio_zero_new_buffers() does it. Suggested-by: Jan Kara Signed-off-by: Shida Zhang Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240830053739.3588573-2-zhangshida@kylinos.cn Signed-off-by: Theodore Ts'o --- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a6f1286e824d..5ffd56ceeddd 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1371,9 +1371,9 @@ static void ext4_journalled_zero_new_buffers(handle_t *handle, size = min(to, block_end) - start; folio_zero_range(folio, start, size); - write_end_fn(handle, inode, bh); } clear_buffer_new(bh); + write_end_fn(handle, inode, bh); } } block_start = block_end;