/* * Lifetime of the structure differs for normal and permission events. In both * cases the structure is allocated in fanotify_handle_event(). For normal * events the structure is freed immediately after reporting it to userspace. * For permission events we free it only after we receive response from * userspace. */
structfanotify_event_info{structfsnotify_eventfse;/* * We hold ref to this path so it may be dereferenced at any point * during this object's lifetime */structpathpath;structpid*tgid;#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONSu32response;/* userspace answer to question */#endif};staticinlinestructfanotify_event_info*FANOTIFY_E(structfsnotify_event*fse){returncontainer_of(fse,structfanotify_event_info,fse);}