From: Harshad Shirwadkar Date: Tue, 24 Dec 2019 19:09:40 +0000 (-0800) Subject: ext4: force buffer up-to-date while marking it dirty X-Git-Tag: v5.15~4137^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2eeca099bbda45029da35abecb428a9084a5463;p=platform%2Fkernel%2Flinux-starfive.git ext4: force buffer up-to-date while marking it dirty Writeback errors can leave buffer in not up-to-date state when there are errors during background writes. Force buffer up-to-date while marking it dirty. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20191224190940.157952-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 1f53d64..ee3755c 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -332,6 +332,7 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, err); } } else { + set_buffer_uptodate(bh); if (inode) mark_buffer_dirty_inode(bh, inode); else