Lock order is as follows::
 
-  Page lock (PG_locked bit of page->flags)
+  folio_lock
     mm->page_table_lock or split pte_lock
       folio_memcg_lock (memcg->move_lock)
         mapping->i_pages lock
           lruvec->lru_lock.
 
 Per-node-per-memcgroup LRU (cgroup's private LRU) is guarded by
-lruvec->lru_lock; PG_lru bit of page->flags is cleared before
+lruvec->lru_lock; the folio LRU flag is cleared before
 isolating a page from its LRU under lruvec->lru_lock.
 
 .. _cgroup-v1-memory-kernel-extension:
 
 ``struct page`` with ``PG_head`` are fake head ``struct page``.  We need an
 approach to distinguish between those two different types of ``struct page`` so
 that ``compound_head()`` can return the real head ``struct page`` when the
-parameter is the tail ``struct page`` but with ``PG_head``. The following code
-snippet describes how to distinguish between real and fake head ``struct page``.
-
-.. code-block:: c
-
-       if (test_bit(PG_head, &page->flags)) {
-               unsigned long head = READ_ONCE(page[1].compound_head);
-
-               if (head & 1) {
-                       if (head == (unsigned long)page + 1)
-                               /* head struct page */
-                       else
-                               /* tail struct page */
-               } else {
-                       /* head struct page */
-               }
-       }
-
-We can safely access the field of the **page[1]** with ``PG_head`` because the
-page is a compound page composed with at least two contiguous pages.
-The implementation refers to ``page_fixed_fake_head()``.
+parameter is the tail ``struct page`` but with ``PG_head``.
 
 Device DAX
 ==========
 
        如果D-cache别名不是一个问题,这个程序可以简单地定义为该架构上
        的nop。
 
-       在page->flags (PG_arch_1)中有一个位是“架构私有”。内核保证,
+       在folio->flags (PG_arch_1)中有一个位是“架构私有”。内核保证,
        对于分页缓存的页面,当这样的页面第一次进入分页缓存时,它将清除
        这个位。
 
 
        if (!mops->isolate_page(&folio->page, mode))
                goto out_no_isolated;
 
-       /* Driver shouldn't use PG_isolated bit of page->flags */
+       /* Driver shouldn't use the isolated flag */
        WARN_ON_ONCE(folio_test_isolated(folio));
        folio_set_isolated(folio);
        folio_unlock(folio);
 
  * inode->i_rwsem      (while writing or truncating, not reading or faulting)
  *   mm->mmap_lock
  *     mapping->invalidate_lock (in filemap_fault)
- *       page->flags PG_locked (lock_page)
+ *       folio_lock
  *         hugetlbfs_i_mmap_rwsem_key (in huge_pmd_share, see hugetlbfs below)
  *           vma_start_write
  *             mapping->i_mmap_rwsem
  *   hugetlb_fault_mutex (hugetlbfs specific page fault mutex)
  *     vma_lock (hugetlb specific lock for pmd_sharing)
  *       mapping->i_mmap_rwsem (also used for hugetlb pmd sharing)
- *         page->flags PG_locked (lock_page)
+ *         folio_lock
  */
 
 #include <linux/mm.h>