]> Git Repo - J-linux.git/commitdiff
iomap: Remove calls to set and clear folio error flag
authorMatthew Wilcox (Oracle) <[email protected]>
Thu, 30 May 2024 20:21:07 +0000 (21:21 +0100)
committerChristian Brauner <[email protected]>
Fri, 31 May 2024 10:31:42 +0000 (12:31 +0200)
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]>
fs/iomap/buffered-io.c

index 41c8f0c68ef564960a4341f605d9da135e9f14ef..4175578aeeededd83fb61cc77f0044bad645eae6 100644 (file)
@@ -306,8 +306,6 @@ static void iomap_finish_folio_read(struct folio *folio, size_t off,
                spin_unlock_irqrestore(&ifs->state_lock, flags);
        }
 
-       if (error)
-               folio_set_error(folio);
        if (finished)
                folio_end_read(folio, uptodate);
 }
@@ -460,9 +458,6 @@ int iomap_read_folio(struct folio *folio, const struct iomap_ops *ops)
        while ((ret = iomap_iter(&iter, ops)) > 0)
                iter.processed = iomap_readpage_iter(&iter, &ctx, 0);
 
-       if (ret < 0)
-               folio_set_error(folio);
-
        if (ctx.bio) {
                submit_bio(ctx.bio);
                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,
 
        if (folio_test_uptodate(folio))
                return 0;
-       folio_clear_error(folio);
 
        do {
                iomap_adjust_read_range(iter->inode, folio, &block_start,
@@ -1543,8 +1537,6 @@ iomap_finish_ioend(struct iomap_ioend *ioend, int error)
 
        /* walk all folios in bio, ending page IO on them */
        bio_for_each_folio_all(fi, bio) {
-               if (error)
-                       folio_set_error(fi.folio);
                iomap_finish_folio_write(inode, fi.folio, fi.length);
                folio_count++;
        }
This page took 0.053276 seconds and 4 git commands to generate.