| Function report | 
| Source Code: fs\ramfs\file-nommu.c | Create Date:2022-07-28 20:35:07 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:add a contiguous set of pages into a ramfs inode when it's truncated from* size 0 on the assumption that it's going to be used for an mmap of shared* memory
Proto:int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct inode * | inode | |
| size_t | newsize | 
| 69 | gfp = mapping_gfp_mask(i_mapping) | 
| 72 | order = get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory | 
| 73 | If Value for the false possibility is greater at compile time(order >= Free memory management - zoned buddy allocator. ) Then Return -EFBIG | 
| 76 | ret = de_newsize_ok - may this inode be truncated to a given size*@inode: the inode to be truncated*@offset: the new size to assign to the inode* inode_newsize_ok must be called with i_mutex held | 
| 84 | pages = alloc_pages(gfp, order) | 
| 90 | npages = newsize + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size | 
| 100 | data = page_address(pages) | 
| 113 | SetPageDirty(page) | 
| 114 | SetPageUptodate(page) | 
| 120 | Return 0 | 
| 122 | add_error : | 
| 124 | __free_page(pages + loop++) | 
| 125 | Return ret | 
| Name | Describe | 
|---|---|
| ramfs_nommu_resize | |
| __shmem_file_setup | mmon code | 
| 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 |