Lines Matching full:pages
58 * add a contiguous set of pages into a ramfs inode when it's truncated from
65 struct page *pages; in ramfs_nommu_expand_for_mapping() local
82 /* allocate enough contiguous pages to be able to satisfy the in ramfs_nommu_expand_for_mapping()
84 pages = alloc_pages(gfp, order); in ramfs_nommu_expand_for_mapping()
85 if (!pages) in ramfs_nommu_expand_for_mapping()
88 /* split the high-order page into an array of single pages */ in ramfs_nommu_expand_for_mapping()
92 split_page(pages, order); in ramfs_nommu_expand_for_mapping()
94 /* trim off any pages we don't actually require */ in ramfs_nommu_expand_for_mapping()
96 __free_page(pages + loop); in ramfs_nommu_expand_for_mapping()
100 data = page_address(pages); in ramfs_nommu_expand_for_mapping()
103 /* attach all the pages to the inode's address space */ in ramfs_nommu_expand_for_mapping()
105 struct page *page = pages + loop; in ramfs_nommu_expand_for_mapping()
124 __free_page(pages + loop++); in ramfs_nommu_expand_for_mapping()
198 * - the pages to be mapped must exist
199 * - the pages be physically contiguous in sequence
207 struct page **pages = NULL, **ptr, *page; in ramfs_nommu_get_unmapped_area() local
222 /* gang-find the pages */ in ramfs_nommu_get_unmapped_area()
223 pages = kcalloc(lpages, sizeof(struct page *), GFP_KERNEL); in ramfs_nommu_get_unmapped_area()
224 if (!pages) in ramfs_nommu_get_unmapped_area()
227 nr = find_get_pages_contig(inode->i_mapping, pgoff, lpages, pages); in ramfs_nommu_get_unmapped_area()
229 goto out_free_pages; /* leave if some pages were missing */ in ramfs_nommu_get_unmapped_area()
231 /* check the pages for physical adjacency */ in ramfs_nommu_get_unmapped_area()
232 ptr = pages; in ramfs_nommu_get_unmapped_area()
240 ret = (unsigned long) page_address(pages[0]); in ramfs_nommu_get_unmapped_area()
243 ptr = pages; in ramfs_nommu_get_unmapped_area()
247 kfree(pages); in ramfs_nommu_get_unmapped_area()