diff options
author | Matthew Wilcox (Oracle) | 2024-05-30 21:21:08 +0100 |
---|---|---|
committer | Christian Brauner | 2024-05-31 12:31:43 +0200 |
commit | 7ad635ea82704a64c40aba67a7d04293d4780f0f (patch) | |
tree | b4195bc4a89226822fc785640f79ac8660d1d3a2 /fs/mpage.c | |
parent | 1f56eedf7ff76b71f88f80d8b539f254ecbce561 (diff) |
buffer: Remove calls to set and clear the folio error flag
The folio error flag is not tested anywhere, so we can stop setting
and clearing it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240530202110.2653630-17-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/mpage.c')
-rw-r--r-- | fs/mpage.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/mpage.c b/fs/mpage.c index fa8b99a199fa..b5b5ddf9d513 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -48,13 +48,8 @@ static void mpage_read_end_io(struct bio *bio) struct folio_iter fi; int err = blk_status_to_errno(bio->bi_status); - bio_for_each_folio_all(fi, bio) { - if (err) - folio_set_error(fi.folio); - else - folio_mark_uptodate(fi.folio); - folio_unlock(fi.folio); - } + bio_for_each_folio_all(fi, bio) + folio_end_read(fi.folio, err == 0); bio_put(bio); } @@ -65,10 +60,8 @@ static void mpage_write_end_io(struct bio *bio) int err = blk_status_to_errno(bio->bi_status); bio_for_each_folio_all(fi, bio) { - if (err) { - folio_set_error(fi.folio); + if (err) mapping_set_error(fi.folio->mapping, err); - } folio_end_writeback(fi.folio); } |