Lines Matching defs:page

21 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize,
22 int pages, struct page **page, int bytes);
24 /* Read separately compressed datablock directly into page cache */
25 int squashfs_readpage_block(struct page *target_page, u64 block, int bsize,
37 struct page **page;
46 page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL);
47 if (page == NULL)
51 * Create a "page actor" which will kmap and kunmap the
52 * page cache pages appropriately within the decompressor
54 actor = squashfs_page_actor_init_special(page, pages, 0);
60 page[i] = (n == target_page->index) ? target_page :
63 if (page[i] == NULL) {
68 if (PageUptodate(page[i])) {
69 unlock_page(page[i]);
70 put_page(page[i]);
71 page[i] = NULL;
78 * Couldn't get one or more pages, this page has either
79 * been VM reclaimed, but others are still in the page cache
85 page, expected);
92 /* Decompress directly into the page cache buffers */
102 /* Last page may have trailing bytes not filled */
105 pageaddr = kmap_atomic(page[pages - 1]);
112 flush_dcache_page(page[i]);
113 SetPageUptodate(page[i]);
114 unlock_page(page[i]);
115 if (page[i] != target_page)
116 put_page(page[i]);
120 kfree(page);
129 if (page[i] == NULL || page[i] == target_page)
131 flush_dcache_page(page[i]);
132 SetPageError(page[i]);
133 unlock_page(page[i]);
134 put_page(page[i]);
139 kfree(page);
144 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize,
145 int pages, struct page **page, int bytes)
153 ERROR("Unable to read page, block %llx, size %x\n", block,
162 if (page[n] == NULL)
165 squashfs_fill_page(page[n], buffer, offset, avail);
166 unlock_page(page[n]);
167 if (page[n] != target_page)
168 put_page(page[n]);