Skip to content

Commit 1f56eed

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
iomap: Remove calls to set and clear folio error flag
The folio error flag is not checked anywhere, so we can remove the calls to set and clear it. Cc: Christian Brauner <[email protected]> Cc: [email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 55050b6 commit 1f56eed

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

fs/iomap/buffered-io.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ static void iomap_finish_folio_read(struct folio *folio, size_t off,
306306
spin_unlock_irqrestore(&ifs->state_lock, flags);
307307
}
308308

309-
if (error)
310-
folio_set_error(folio);
311309
if (finished)
312310
folio_end_read(folio, uptodate);
313311
}
@@ -460,9 +458,6 @@ int iomap_read_folio(struct folio *folio, const struct iomap_ops *ops)
460458
while ((ret = iomap_iter(&iter, ops)) > 0)
461459
iter.processed = iomap_readpage_iter(&iter, &ctx, 0);
462460

463-
if (ret < 0)
464-
folio_set_error(folio);
465-
466461
if (ctx.bio) {
467462
submit_bio(ctx.bio);
468463
WARN_ON_ONCE(!ctx.cur_folio_in_bio);
@@ -697,7 +692,6 @@ static int __iomap_write_begin(const struct iomap_iter *iter, loff_t pos,
697692

698693
if (folio_test_uptodate(folio))
699694
return 0;
700-
folio_clear_error(folio);
701695

702696
do {
703697
iomap_adjust_read_range(iter->inode, folio, &block_start,
@@ -1543,8 +1537,6 @@ iomap_finish_ioend(struct iomap_ioend *ioend, int error)
15431537

15441538
/* walk all folios in bio, ending page IO on them */
15451539
bio_for_each_folio_all(fi, bio) {
1546-
if (error)
1547-
folio_set_error(fi.folio);
15481540
iomap_finish_folio_write(inode, fi.folio, fi.length);
15491541
folio_count++;
15501542
}

0 commit comments

Comments
 (0)