ext4: force buffer up-to-date while marking it dirty
diff mbox series

Message ID 20191224190940.157952-1-harshadshirwadkar@gmail.com
State New
Headers show
Series
  • ext4: force buffer up-to-date while marking it dirty
Related show

Commit Message

harshad shirwadkar Dec. 24, 2019, 7:09 p.m. UTC
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>
---
 fs/ext4/ext4_jbd2.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index 7c70b08d104c..ac50bd4e1f2f 100644
--- a/fs/ext4/ext4_jbd2.c
+++ b/fs/ext4/ext4_jbd2.c
@@ -292,6 +292,7 @@  int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
 					 handle->h_buffer_credits, err);
 		}
 	} else {
+		set_buffer_uptodate(bh);
 		if (inode)
 			mark_buffer_dirty_inode(bh, inode);
 		else