blob: ed855ef6f0775e447489e7dd43e00ff3891c850e [file] [log] [blame]
Eric Paris63c882a2009-05-21 17:02:01 -04001#include <linux/fsnotify_backend.h>
2#include <linux/inotify.h>
3#include <linux/slab.h> /* struct kmem_cache */
4
Jan Kara7053aee2014-01-21 15:48:14 -08005struct inotify_event_info {
6 struct fsnotify_event fse;
Eric Paris63c882a2009-05-21 17:02:01 -04007 int wd;
Jan Kara7053aee2014-01-21 15:48:14 -08008 u32 sync_cookie;
9 int name_len;
10 char name[];
Eric Paris63c882a2009-05-21 17:02:01 -040011};
12
Eric Paris000285d2009-12-17 21:24:24 -050013struct inotify_inode_mark {
14 struct fsnotify_mark fsn_mark;
Eric Paris63c882a2009-05-21 17:02:01 -040015 int wd;
16};
17
Jan Kara7053aee2014-01-21 15:48:14 -080018static inline struct inotify_event_info *INOTIFY_E(struct fsnotify_event *fse)
19{
20 return container_of(fse, struct inotify_event_info, fse);
21}
22
Eric Paris000285d2009-12-17 21:24:24 -050023extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
Eric Paris528da3e2009-06-12 16:04:26 -040024 struct fsnotify_group *group);
Jan Kara7053aee2014-01-21 15:48:14 -080025extern int inotify_handle_event(struct fsnotify_group *group,
26 struct inode *inode,
27 struct fsnotify_mark *inode_mark,
28 struct fsnotify_mark *vfsmount_mark,
29 u32 mask, void *data, int data_type,
Jan Kara45a22f42014-02-17 13:09:50 +010030 const unsigned char *file_name, u32 cookie);
Eric Paris63c882a2009-05-21 17:02:01 -040031
32extern const struct fsnotify_ops inotify_fsnotify_ops;