Lines Matching refs:page

23 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize,
24 int pages, struct page **page);
27 int squashfs_readpage_block(struct page *target_page, u64 block, int bsize) in squashfs_readpage_block()
38 struct page **page; in squashfs_readpage_block() local
47 page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL); in squashfs_readpage_block()
48 if (page == NULL) in squashfs_readpage_block()
55 actor = squashfs_page_actor_init_special(page, pages, 0); in squashfs_readpage_block()
61 page[i] = (n == target_page->index) ? target_page : in squashfs_readpage_block()
64 if (page[i] == NULL) { in squashfs_readpage_block()
69 if (PageUptodate(page[i])) { in squashfs_readpage_block()
70 unlock_page(page[i]); in squashfs_readpage_block()
71 page_cache_release(page[i]); in squashfs_readpage_block()
72 page[i] = NULL; in squashfs_readpage_block()
86 page); in squashfs_readpage_block()
101 pageaddr = kmap_atomic(page[pages - 1]); in squashfs_readpage_block()
108 flush_dcache_page(page[i]); in squashfs_readpage_block()
109 SetPageUptodate(page[i]); in squashfs_readpage_block()
110 unlock_page(page[i]); in squashfs_readpage_block()
111 if (page[i] != target_page) in squashfs_readpage_block()
112 page_cache_release(page[i]); in squashfs_readpage_block()
116 kfree(page); in squashfs_readpage_block()
125 if (page[i] == NULL || page[i] == target_page) in squashfs_readpage_block()
127 flush_dcache_page(page[i]); in squashfs_readpage_block()
128 SetPageError(page[i]); in squashfs_readpage_block()
129 unlock_page(page[i]); in squashfs_readpage_block()
130 page_cache_release(page[i]); in squashfs_readpage_block()
135 kfree(page); in squashfs_readpage_block()
140 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize, in squashfs_read_cache()
141 int pages, struct page **page) in squashfs_read_cache() argument
159 if (page[n] == NULL) in squashfs_read_cache()
162 pageaddr = kmap_atomic(page[n]); in squashfs_read_cache()
166 flush_dcache_page(page[n]); in squashfs_read_cache()
167 SetPageUptodate(page[n]); in squashfs_read_cache()
168 unlock_page(page[n]); in squashfs_read_cache()
169 if (page[n] != target_page) in squashfs_read_cache()
170 page_cache_release(page[n]); in squashfs_read_cache()