• Home
  • Raw
  • Download

Lines Matching refs:event

54 static int fanotify_merge(struct list_head *list, struct fsnotify_event *event)  in fanotify_merge()  argument
59 pr_debug("%s: list=%p event=%p\n", __func__, list, event); in fanotify_merge()
60 new = FANOTIFY_E(event); in fanotify_merge()
71 if (should_merge(test_event, event)) { in fanotify_merge()
88 struct fanotify_perm_event *event, in fanotify_get_response() argument
93 pr_debug("%s: group=%p event=%p\n", __func__, group, event); in fanotify_get_response()
96 event->state == FAN_EVENT_ANSWERED); in fanotify_get_response()
101 if (event->state == FAN_EVENT_REPORTED) { in fanotify_get_response()
103 event->state = FAN_EVENT_CANCELED; in fanotify_get_response()
108 if (event->state == FAN_EVENT_INIT) in fanotify_get_response()
109 fsnotify_remove_queued_event(group, &event->fae.fse); in fanotify_get_response()
120 switch (event->response & ~FAN_AUDIT) { in fanotify_get_response()
130 if (event->response & FAN_AUDIT) in fanotify_get_response()
131 audit_fanotify(event->response & ~FAN_AUDIT); in fanotify_get_response()
134 group, event, ret); in fanotify_get_response()
136 fsnotify_destroy_event(group, &event->fae.fse); in fanotify_get_response()
213 static int fanotify_encode_fid(struct fanotify_event *event, in fanotify_encode_fid() argument
217 struct fanotify_fid *fid = &event->fid; in fanotify_encode_fid()
244 event->fh_len = bytes; in fanotify_encode_fid()
254 event->fh_len = 0; in fanotify_encode_fid()
284 struct fanotify_event *event = NULL; in fanotify_alloc_event() local
308 event = &pevent->fae; in fanotify_alloc_event()
313 event = kmem_cache_alloc(fanotify_event_cachep, gfp); in fanotify_alloc_event()
314 if (!event) in fanotify_alloc_event()
317 fsnotify_init_event(&event->fse, inode); in fanotify_alloc_event()
318 event->mask = mask; in fanotify_alloc_event()
320 event->pid = get_pid(task_pid(current)); in fanotify_alloc_event()
322 event->pid = get_pid(task_tgid(current)); in fanotify_alloc_event()
323 event->fh_len = 0; in fanotify_alloc_event()
326 event->fh_type = fanotify_encode_fid(event, id, gfp, fsid); in fanotify_alloc_event()
328 event->fh_type = FILEID_ROOT; in fanotify_alloc_event()
329 event->path = *((struct path *)data); in fanotify_alloc_event()
330 path_get(&event->path); in fanotify_alloc_event()
332 event->fh_type = FILEID_INVALID; in fanotify_alloc_event()
333 event->path.mnt = NULL; in fanotify_alloc_event()
334 event->path.dentry = NULL; in fanotify_alloc_event()
338 return event; in fanotify_alloc_event()
381 struct fanotify_event *event; in fanotify_handle_event() local
431 event = fanotify_alloc_event(group, inode, mask, data, data_type, in fanotify_handle_event()
434 if (unlikely(!event)) { in fanotify_handle_event()
444 fsn_event = &event->fse; in fanotify_handle_event()
475 struct fanotify_event *event; in fanotify_free_event() local
477 event = FANOTIFY_E(fsn_event); in fanotify_free_event()
478 if (fanotify_event_has_path(event)) in fanotify_free_event()
479 path_put(&event->path); in fanotify_free_event()
480 else if (fanotify_event_has_ext_fh(event)) in fanotify_free_event()
481 kfree(event->fid.ext_fh); in fanotify_free_event()
482 put_pid(event->pid); in fanotify_free_event()
483 if (fanotify_is_perm_event(event->mask)) { in fanotify_free_event()
488 kmem_cache_free(fanotify_event_cachep, event); in fanotify_free_event()