5 * Phillip Lougher <phillip@squashfs.org.uk>
7 * This work is licensed under the terms of the GNU GPL, version 2. See
8 * the COPYING file in the top-level directory.
11 struct squashfs_page_actor {
18 static inline struct squashfs_page_actor *squashfs_page_actor_init(void **page,
19 int pages, int length)
21 struct squashfs_page_actor *actor = kmalloc(sizeof(*actor), GFP_KERNEL);
26 actor->length = length ? : pages * PAGE_CACHE_SIZE;
33 static inline void *squashfs_first_page(struct squashfs_page_actor *actor)
36 return actor->page[0];
39 static inline void *squashfs_next_page(struct squashfs_page_actor *actor)
41 return actor->next_page == actor->pages ? NULL :
42 actor->page[actor->next_page++];
45 static inline void squashfs_finish_page(struct squashfs_page_actor *actor)