• Home
  • Raw
  • Download

Lines Matching refs:watch

222 	struct xenbus_watch watch;  member
227 static void free_watch_adapter(struct watch_adapter *watch) in free_watch_adapter() argument
229 kfree(watch->watch.node); in free_watch_adapter()
230 kfree(watch->token); in free_watch_adapter()
231 kfree(watch); in free_watch_adapter()
237 struct watch_adapter *watch; in alloc_watch_adapter() local
239 watch = kzalloc(sizeof(*watch), GFP_KERNEL); in alloc_watch_adapter()
240 if (watch == NULL) in alloc_watch_adapter()
243 watch->watch.node = kstrdup(path, GFP_KERNEL); in alloc_watch_adapter()
244 if (watch->watch.node == NULL) in alloc_watch_adapter()
247 watch->token = kstrdup(token, GFP_KERNEL); in alloc_watch_adapter()
248 if (watch->token == NULL) in alloc_watch_adapter()
251 return watch; in alloc_watch_adapter()
254 free_watch_adapter(watch); in alloc_watch_adapter()
260 static void watch_fired(struct xenbus_watch *watch, in watch_fired() argument
271 adap = container_of(watch, struct watch_adapter, watch); in watch_fired()
367 struct watch_adapter *watch, *tmp_watch; in xenbus_write_watch() local
385 watch = alloc_watch_adapter(path, token); in xenbus_write_watch()
386 if (watch == NULL) { in xenbus_write_watch()
391 watch->watch.callback = watch_fired; in xenbus_write_watch()
392 watch->dev_data = u; in xenbus_write_watch()
394 err = register_xenbus_watch(&watch->watch); in xenbus_write_watch()
396 free_watch_adapter(watch); in xenbus_write_watch()
400 list_add(&watch->list, &u->watches); in xenbus_write_watch()
402 list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) { in xenbus_write_watch()
403 if (!strcmp(watch->token, token) && in xenbus_write_watch()
404 !strcmp(watch->watch.node, path)) { in xenbus_write_watch()
405 unregister_xenbus_watch(&watch->watch); in xenbus_write_watch()
406 list_del(&watch->list); in xenbus_write_watch()
407 free_watch_adapter(watch); in xenbus_write_watch()
562 struct watch_adapter *watch, *tmp_watch; in xenbus_file_release() local
576 list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) { in xenbus_file_release()
577 unregister_xenbus_watch(&watch->watch); in xenbus_file_release()
578 list_del(&watch->list); in xenbus_file_release()
579 free_watch_adapter(watch); in xenbus_file_release()