diff mbox series

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

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

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(+)

Comments

Theodore Ts'o March 5, 2020, 8:36 p.m. UTC | #1
On Tue, Dec 24, 2019 at 11:09:40AM -0800, Harshad Shirwadkar wrote:
> 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>

Thanks, applied.

					- Ted
diff mbox series

Patch

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