1 #include <linux/fsnotify_backend.h>
2 #include <linux/inotify.h>
3 #include <linux/slab.h> /* struct kmem_cache */
5 struct inotify_event_info {
6 struct fsnotify_event fse;
13 struct inotify_inode_mark {
14 struct fsnotify_mark fsn_mark;
18 static inline struct inotify_event_info *INOTIFY_E(struct fsnotify_event *fse)
20 return container_of(fse, struct inotify_event_info, fse);
24 * INOTIFY_USER_FLAGS represents all of the mask bits that we expose to
25 * userspace. There is at least one bit (FS_EVENT_ON_CHILD) which is
26 * used only internally to the kernel.
28 #define INOTIFY_USER_MASK (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK)
30 static inline __u32 inotify_mark_user_mask(struct fsnotify_mark *fsn_mark)
32 return fsn_mark->mask & INOTIFY_USER_MASK;
35 extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
36 struct fsnotify_group *group);
37 extern int inotify_handle_event(struct fsnotify_group *group,
39 struct fsnotify_mark *inode_mark,
40 struct fsnotify_mark *vfsmount_mark,
41 u32 mask, void *data, int data_type,
42 const unsigned char *file_name, u32 cookie);
44 extern const struct fsnotify_ops inotify_fsnotify_ops;