Lines Matching refs:monitor

27 	struct cachefiles_one_read *monitor =  in cachefiles_read_waiter()  local
28 container_of(wait, struct cachefiles_one_read, monitor); in cachefiles_read_waiter()
36 monitor->netfs_page->index, mode, sync, in cachefiles_read_waiter()
54 ASSERT(monitor->op); in cachefiles_read_waiter()
56 object = container_of(monitor->op->op.object, in cachefiles_read_waiter()
60 list_add_tail(&monitor->op_link, &monitor->op->to_do); in cachefiles_read_waiter()
63 fscache_enqueue_retrieval(monitor->op); in cachefiles_read_waiter()
75 struct cachefiles_one_read *monitor) in cachefiles_read_reissue() argument
78 struct page *backpage = monitor->back_page, *backpage2; in cachefiles_read_reissue()
107 INIT_LIST_HEAD(&monitor->op_link); in cachefiles_read_reissue()
108 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_reissue()
139 list_del(&monitor->op_link); in cachefiles_read_reissue()
151 struct cachefiles_one_read *monitor; in cachefiles_read_copier() local
166 monitor = list_entry(op->to_do.next, in cachefiles_read_copier()
168 list_del(&monitor->op_link); in cachefiles_read_copier()
172 _debug("- copy {%lu}", monitor->back_page->index); in cachefiles_read_copier()
178 } else if (PageUptodate(monitor->back_page)) { in cachefiles_read_copier()
179 copy_highpage(monitor->netfs_page, monitor->back_page); in cachefiles_read_copier()
180 fscache_mark_page_cached(monitor->op, in cachefiles_read_copier()
181 monitor->netfs_page); in cachefiles_read_copier()
183 } else if (!PageError(monitor->back_page)) { in cachefiles_read_copier()
185 error = cachefiles_read_reissue(object, monitor); in cachefiles_read_copier()
193 (unsigned long) monitor->back_page->flags); in cachefiles_read_copier()
197 page_cache_release(monitor->back_page); in cachefiles_read_copier()
199 fscache_end_io(op, monitor->netfs_page, error); in cachefiles_read_copier()
200 page_cache_release(monitor->netfs_page); in cachefiles_read_copier()
203 kfree(monitor); in cachefiles_read_copier()
230 struct cachefiles_one_read *monitor; in cachefiles_read_backing_file_one() local
240 monitor = kzalloc(sizeof(*monitor), cachefiles_gfp); in cachefiles_read_backing_file_one()
241 if (!monitor) in cachefiles_read_backing_file_one()
244 monitor->netfs_page = netpage; in cachefiles_read_backing_file_one()
245 monitor->op = fscache_get_retrieval(op); in cachefiles_read_backing_file_one()
247 init_waitqueue_func_entry(&monitor->monitor, cachefiles_read_waiter); in cachefiles_read_backing_file_one()
291 page_cache_get(monitor->netfs_page); in cachefiles_read_backing_file_one()
293 monitor->back_page = backpage; in cachefiles_read_backing_file_one()
294 monitor->monitor.private = backpage; in cachefiles_read_backing_file_one()
295 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_backing_file_one()
296 monitor = NULL; in cachefiles_read_backing_file_one()
346 if (monitor) { in cachefiles_read_backing_file_one()
347 fscache_put_retrieval(monitor->op); in cachefiles_read_backing_file_one()
348 kfree(monitor); in cachefiles_read_backing_file_one()
368 fscache_put_retrieval(monitor->op); in cachefiles_read_backing_file_one()
369 kfree(monitor); in cachefiles_read_backing_file_one()
467 struct cachefiles_one_read *monitor = NULL; in cachefiles_read_backing_file() local
480 if (!monitor) { in cachefiles_read_backing_file()
481 monitor = kzalloc(sizeof(*monitor), cachefiles_gfp); in cachefiles_read_backing_file()
482 if (!monitor) in cachefiles_read_backing_file()
485 monitor->op = fscache_get_retrieval(op); in cachefiles_read_backing_file()
486 init_waitqueue_func_entry(&monitor->monitor, in cachefiles_read_backing_file()
542 monitor->netfs_page = netpage; in cachefiles_read_backing_file()
545 monitor->back_page = backpage; in cachefiles_read_backing_file()
546 monitor->monitor.private = backpage; in cachefiles_read_backing_file()
547 add_page_wait_queue(backpage, &monitor->monitor); in cachefiles_read_backing_file()
548 monitor = NULL; in cachefiles_read_backing_file()
640 if (monitor) { in cachefiles_read_backing_file()
642 kfree(monitor); in cachefiles_read_backing_file()