*/
 static int me_pagecache_clean(struct page_state *ps, struct page *p)
 {
+       struct folio *folio = page_folio(p);
        int ret;
        struct address_space *mapping;
        bool extra_pins;
        delete_from_lru_cache(p);
 
        /*
-        * For anonymous pages we're done the only reference left
+        * For anonymous folios the only reference left
         * should be the one m_f() holds.
         */
-       if (PageAnon(p)) {
+       if (folio_test_anon(folio)) {
                ret = MF_RECOVERED;
                goto out;
        }
         * has a reference, because it could be file system metadata
         * and that's not safe to truncate.
         */
-       mapping = page_mapping(p);
+       mapping = folio_mapping(folio);
        if (!mapping) {
-               /*
-                * Page has been teared down in the meanwhile
-                */
+               /* Folio has been torn down in the meantime */
                ret = MF_FAILED;
                goto out;
        }
                ret = MF_FAILED;
 
 out:
-       unlock_page(p);
+       folio_unlock(folio);
 
        return ret;
 }