1 #include <linux/fsnotify_backend.h>
2 #include <linux/path.h>
3 #include <linux/slab.h>
5 extern struct kmem_cache
*fanotify_event_cachep
;
8 * Lifetime of the structure differs for normal and permission events. In both
9 * cases the structure is allocated in fanotify_handle_event(). For normal
10 * events the structure is freed immediately after reporting it to userspace.
11 * For permission events we free it only after we receive response from
14 struct fanotify_event_info
{
15 struct fsnotify_event fse
;
17 * We hold ref to this path so it may be dereferenced at any point
18 * during this object's lifetime
22 #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
23 u32 response
; /* userspace answer to question */
27 static inline struct fanotify_event_info
*FANOTIFY_E(struct fsnotify_event
*fse
)
29 return container_of(fse
, struct fanotify_event_info
, fse
);