• Home
  • Raw
  • Download

Lines Matching refs:actor

22 static void *cache_first_page(struct squashfs_page_actor *actor)  in cache_first_page()  argument
24 actor->next_page = 1; in cache_first_page()
25 return actor->buffer[0]; in cache_first_page()
28 static void *cache_next_page(struct squashfs_page_actor *actor) in cache_next_page() argument
30 if (actor->next_page == actor->pages) in cache_next_page()
33 return actor->buffer[actor->next_page++]; in cache_next_page()
36 static void cache_finish_page(struct squashfs_page_actor *actor) in cache_finish_page() argument
44 struct squashfs_page_actor *actor = kmalloc(sizeof(*actor), GFP_KERNEL); in squashfs_page_actor_init() local
46 if (actor == NULL) in squashfs_page_actor_init()
49 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init()
50 actor->buffer = buffer; in squashfs_page_actor_init()
51 actor->pages = pages; in squashfs_page_actor_init()
52 actor->next_page = 0; in squashfs_page_actor_init()
53 actor->squashfs_first_page = cache_first_page; in squashfs_page_actor_init()
54 actor->squashfs_next_page = cache_next_page; in squashfs_page_actor_init()
55 actor->squashfs_finish_page = cache_finish_page; in squashfs_page_actor_init()
56 return actor; in squashfs_page_actor_init()
60 static void *direct_first_page(struct squashfs_page_actor *actor) in direct_first_page() argument
62 actor->next_page = 1; in direct_first_page()
63 return actor->pageaddr = kmap_atomic(actor->page[0]); in direct_first_page()
66 static void *direct_next_page(struct squashfs_page_actor *actor) in direct_next_page() argument
68 if (actor->pageaddr) in direct_next_page()
69 kunmap_atomic(actor->pageaddr); in direct_next_page()
71 return actor->pageaddr = actor->next_page == actor->pages ? NULL : in direct_next_page()
72 kmap_atomic(actor->page[actor->next_page++]); in direct_next_page()
75 static void direct_finish_page(struct squashfs_page_actor *actor) in direct_finish_page() argument
77 if (actor->pageaddr) in direct_finish_page()
78 kunmap_atomic(actor->pageaddr); in direct_finish_page()
84 struct squashfs_page_actor *actor = kmalloc(sizeof(*actor), GFP_KERNEL); in squashfs_page_actor_init_special() local
86 if (actor == NULL) in squashfs_page_actor_init_special()
89 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special()
90 actor->page = page; in squashfs_page_actor_init_special()
91 actor->pages = pages; in squashfs_page_actor_init_special()
92 actor->next_page = 0; in squashfs_page_actor_init_special()
93 actor->pageaddr = NULL; in squashfs_page_actor_init_special()
94 actor->squashfs_first_page = direct_first_page; in squashfs_page_actor_init_special()
95 actor->squashfs_next_page = direct_next_page; in squashfs_page_actor_init_special()
96 actor->squashfs_finish_page = direct_finish_page; in squashfs_page_actor_init_special()
97 return actor; in squashfs_page_actor_init_special()