Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / fs / notify / fanotify / fanotify.h
blob32a2f034fb94b5915d1e8362ecbac21f362653fb
1 #include <linux/fsnotify_backend.h>
2 #include <linux/path.h>
3 #include <linux/slab.h>
5 extern struct kmem_cache *fanotify_event_cachep;
7 /*
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
12 * userspace.
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
20 struct path path;
21 struct pid *tgid;
22 #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
23 u32 response; /* userspace answer to question */
24 #endif
27 static inline struct fanotify_event_info *FANOTIFY_E(struct fsnotify_event *fse)
29 return container_of(fse, struct fanotify_event_info, fse);