summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_jbd2.c
diff options
context:
space:
mode:
authorHarshad Shirwadkar <harshadshirwadkar@gmail.com>2019-12-24 22:09:40 +0300
committerTheodore Ts'o <tytso@mit.edu>2020-03-05 23:35:39 +0300
commitf2eeca099bbda45029da35abecb428a9084a5463 (patch)
treec345bbd7687392d3682ed88269e84d4ba6bf1e95 /fs/ext4/ext4_jbd2.c
parent98d54f81e36ba3bf92172791eba5ca5bd813989b (diff)
downloadlinux-f2eeca099bbda45029da35abecb428a9084a5463.tar.xz
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 <harshadshirwadkar@gmail.com> Link: https://lore.kernel.org/r/20191224190940.157952-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r--fs/ext4/ext4_jbd2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index 1f53d64e42a5..ee3755c3110a 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