| Function report | 
| Source Code: mm\z3fold.c | Create Date:2022-07-28 16:30:37 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:z3fold_page_migrate
Proto:static int z3fold_page_migrate(struct address_space *mapping, struct page *newpage, struct page *page, enum migrate_mode mode)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct address_space * | mapping | |
| struct page * | newpage | |
| struct page * | page | |
| enum migrate_mode | mode | 
| 1611 | VM_BUG_ON_PAGE(!PageMovable(page), page) | 
| 1612 | VM_BUG_ON_PAGE(!PageIsolated(page), page) | 
| 1613 | VM_BUG_ON_PAGE(!PageLocked(newpage), newpage) | 
| 1615 | zhdr = page_address(page) | 
| 1616 | pool = zhdr_to_pool(zhdr) | 
| 1618 | If Not Try to lock a z3fold page Then | 
| 1619 | Return -EAGAIN | 
| 1621 | If mapped_count != 0 || foreign_handles != 0 Then | 
| 1622 | Unlock a z3fold page | 
| 1623 | Return -EBUSY | 
| 1626 | Unlock a z3fold page | 
| 1627 | Return -EAGAIN | 
| 1629 | new_zhdr = page_address(newpage) | 
| 1633 | Unlock a z3fold page | 
| 1635 | INIT_WORK( & work, compact_page_work) | 
| 1641 | new_mapping = page_mapping(page) | 
| 1642 | __ClearPageMovable(page) | 
| 1646 | Lock a z3fold page | 
| 1647 | If first_chunks Then encode_handle(new_zhdr, FIRST) | 
| 1649 | If last_chunks Then encode_handle(new_zhdr, LAST) | 
| 1651 | If middle_chunks Then encode_handle(new_zhdr, MIDDLE) | 
| 1654 | cpu = smp_processor_id() | 
| 1657 | spin_unlock( & lock) | 
| 1658 | __SetPageMovable(newpage, new_mapping) | 
| 1659 | Unlock a z3fold page | 
| 1665 | Return 0 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |