summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/buffer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 6e8aa77e0f38..db17841d62ba 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -202,12 +202,9 @@ void bh_end_write(struct bio *bio)
struct buffer_head *bh;
bool success = bio_endio_bh(bio, &bh);
- if (success) {
- set_buffer_uptodate(bh);
- } else {
+ if (!success) {
buffer_io_error(bh, ", lost sync page write");
mark_buffer_write_io_error(bh);
- clear_buffer_uptodate(bh);
}
unlock_buffer(bh);
}
@@ -407,12 +404,9 @@ void bh_end_async_write(struct bio *bio)
BUG_ON(!buffer_async_write(bh));
folio = bh->b_folio;
- if (success) {
- set_buffer_uptodate(bh);
- } else {
+ if (!success) {
buffer_io_error(bh, ", lost async page write");
mark_buffer_write_io_error(bh);
- clear_buffer_uptodate(bh);
}
first = folio_buffers(folio);