ext4_end_buffer_io_sync() is the third completion handler in this series that reports a failed write by clearing BH_Uptodate, and jbd2_fc_wait_bufs() is the only thing that looks at the result. Convert both. They have to move in the same patch. The handler lives in ext4 and the wait in jbd2, but neither is used by anything else: the buffers are ext4's fast commit blocks, submitted by ext4_fc_submit_bh() and waited for by jbd2_fc_wait_bufs(). Converting one without the other silently disables fast commit write error reporting. Signed-off-by: Chao Shi --- fs/ext4/fast_commit.c | 2 +- fs/jbd2/journal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 8e2259799614..8cd60c9f2272 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -213,7 +213,7 @@ static void ext4_end_buffer_io_sync(struct bio *bio) } else { ext4_debug("%s: Block %lld not up-to-date", __func__, bh->b_blocknr); - clear_buffer_uptodate(bh); + mark_buffer_write_io_error(bh); } unlock_buffer(bh); diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 9e4cb04587b4..ffe7a22e6699 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -890,7 +890,7 @@ int jbd2_fc_wait_bufs(journal_t *journal, int num_blks) * Update j_fc_off so jbd2_fc_release_bufs can release remain * buffer head. */ - if (unlikely(!buffer_uptodate(bh))) { + if (unlikely(buffer_write_io_error(bh))) { journal->j_fc_off = i + 1; return -EIO; } -- 2.43.0