]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fs: remove calls to set and clear the folio error flag
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 7 Aug 2024 19:35:25 +0000 (20:35 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:53:03 +0000 (17:53 -0700)
Nobody checks the folio error flag any more, so we can stop setting and
clearing it.  Also remove the documentation suggesting to not bother
setting the error bit.

Link: https://lkml.kernel.org/r/20240807193528.1865100-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/filesystems/vfs.rst
mm/filemap.c
mm/migrate.c
mm/page_io.c

index 6e903a903f8f691d55af7f3ae200f959fc7978a2..a6022ec59a2d7367c515efffc7e570e6df2ae52e 100644 (file)
@@ -913,8 +913,7 @@ cache in your filesystem.  The following members are defined:
        stop attempting I/O, it can simply return.  The caller will
        remove the remaining pages from the address space, unlock them
        and decrement the page refcount.  Set PageUptodate if the I/O
-       completes successfully.  Setting PageError on any page will be
-       ignored; simply unlock the page if an I/O error occurs.
+       completes successfully.
 
 ``write_begin``
        Called by the generic buffered write code to ask the filesystem
index 4130be74f6fd3703f99a9a2e1ab3a3f4dabe2f57..7665f2398d4569de95a07cb2bf1d665dfc847bdb 100644 (file)
@@ -530,7 +530,6 @@ static void __filemap_fdatawait_range(struct address_space *mapping,
                        struct folio *folio = fbatch.folios[i];
 
                        folio_wait_writeback(folio);
-                       folio_clear_error(folio);
                }
                folio_batch_release(&fbatch);
                cond_resched();
@@ -2342,13 +2341,6 @@ static int filemap_read_folio(struct file *file, filler_t filler,
        unsigned long pflags;
        int error;
 
-       /*
-        * A previous I/O error may have been due to temporary failures,
-        * eg. multipath errors.  PG_error will be set again if read_folio
-        * fails.
-        */
-       folio_clear_error(folio);
-
        /* Start the actual read. The read will unlock the page. */
        if (unlikely(workingset))
                psi_memstall_enter(&pflags);
index e1383d9cc94495428e879c628da6ede09d207c57..66a5f73ebfdf56b1d1d4c4e8f7be346acdfc3341 100644 (file)
@@ -586,8 +586,6 @@ void folio_migrate_flags(struct folio *newfolio, struct folio *folio)
 {
        int cpupid;
 
-       if (folio_test_error(folio))
-               folio_set_error(newfolio);
        if (folio_test_referenced(folio))
                folio_set_referenced(newfolio);
        if (folio_test_uptodate(folio))
index aa190e3cb050f7a905d2701661451f279661a1e9..a00e2f6151181e39dedf4eee79ffe74b9a179a0c 100644 (file)
@@ -273,9 +273,7 @@ static void sio_write_complete(struct kiocb *iocb, long ret)
                 * memory for allocating transmit buffers.
                 * Mark the page dirty and avoid
                 * folio_rotate_reclaimable but rate-limit the
-                * messages but do not flag PageError like
-                * the normal direct-to-bio case as it could
-                * be temporary.
+                * messages.
                 */
                pr_err_ratelimited("Write error %ld on dio swapfile (%llu)\n",
                                   ret, swap_dev_pos(page_swap_entry(page)));