struct wait_page_queue wait_page;
        wait_queue_entry_t *wait = &wait_page.wait;
        bool thrashing = false;
-       bool delayacct = false;
        unsigned long pflags;
 
        if (bit_nr == PG_locked &&
            !folio_test_uptodate(folio) && folio_test_workingset(folio)) {
-               if (!folio_test_swapbacked(folio)) {
-                       delayacct_thrashing_start();
-                       delayacct = true;
-               }
+               delayacct_thrashing_start();
                psi_memstall_enter(&pflags);
                thrashing = true;
        }
        finish_wait(q, wait);
 
        if (thrashing) {
-               if (delayacct)
-                       delayacct_thrashing_end();
+               delayacct_thrashing_end();
                psi_memstall_leave(&pflags);
        }
 
        struct wait_page_queue wait_page;
        wait_queue_entry_t *wait = &wait_page.wait;
        bool thrashing = false;
-       bool delayacct = false;
        unsigned long pflags;
        wait_queue_head_t *q;
        struct folio *folio = page_folio(pfn_swap_entry_to_page(entry));
 
        q = folio_waitqueue(folio);
        if (!folio_test_uptodate(folio) && folio_test_workingset(folio)) {
-               if (!folio_test_swapbacked(folio)) {
-                       delayacct_thrashing_start();
-                       delayacct = true;
-               }
+               delayacct_thrashing_start();
                psi_memstall_enter(&pflags);
                thrashing = true;
        }
        finish_wait(q, wait);
 
        if (thrashing) {
-               if (delayacct)
-                       delayacct_thrashing_end();
+               delayacct_thrashing_end();
                psi_memstall_leave(&pflags);
        }
 }