Lines Matching refs:page
21 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize,
22 int pages, struct page **page, int bytes);
25 int squashfs_readpage_block(struct page *target_page, u64 block, int bsize, in squashfs_readpage_block()
37 struct page **page; in squashfs_readpage_block() local
46 page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL); in squashfs_readpage_block()
47 if (page == NULL) in squashfs_readpage_block()
54 actor = squashfs_page_actor_init_special(page, pages, 0); in squashfs_readpage_block()
60 page[i] = (n == target_page->index) ? target_page : in squashfs_readpage_block()
63 if (page[i] == NULL) { in squashfs_readpage_block()
68 if (PageUptodate(page[i])) { in squashfs_readpage_block()
69 unlock_page(page[i]); in squashfs_readpage_block()
70 put_page(page[i]); in squashfs_readpage_block()
71 page[i] = NULL; in squashfs_readpage_block()
85 page, expected); in squashfs_readpage_block()
105 pageaddr = kmap_atomic(page[pages - 1]); in squashfs_readpage_block()
112 flush_dcache_page(page[i]); in squashfs_readpage_block()
113 SetPageUptodate(page[i]); in squashfs_readpage_block()
114 unlock_page(page[i]); in squashfs_readpage_block()
115 if (page[i] != target_page) in squashfs_readpage_block()
116 put_page(page[i]); in squashfs_readpage_block()
120 kfree(page); in squashfs_readpage_block()
129 if (page[i] == NULL || page[i] == target_page) in squashfs_readpage_block()
131 flush_dcache_page(page[i]); in squashfs_readpage_block()
132 SetPageError(page[i]); in squashfs_readpage_block()
133 unlock_page(page[i]); in squashfs_readpage_block()
134 put_page(page[i]); in squashfs_readpage_block()
139 kfree(page); in squashfs_readpage_block()
144 static int squashfs_read_cache(struct page *target_page, u64 block, int bsize, in squashfs_read_cache()
145 int pages, struct page **page, int bytes) in squashfs_read_cache() argument
162 if (page[n] == NULL) in squashfs_read_cache()
165 squashfs_fill_page(page[n], buffer, offset, avail); in squashfs_read_cache()
166 unlock_page(page[n]); in squashfs_read_cache()
167 if (page[n] != target_page) in squashfs_read_cache()
168 put_page(page[n]); in squashfs_read_cache()