| .. | .. |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | struct inotify_event_info { |
|---|
| 7 | 7 | struct fsnotify_event fse; |
|---|
| 8 | + u32 mask; |
|---|
| 8 | 9 | int wd; |
|---|
| 9 | 10 | u32 sync_cookie; |
|---|
| 10 | 11 | int name_len; |
|---|
| .. | .. |
|---|
| 21 | 22 | return container_of(fse, struct inotify_event_info, fse); |
|---|
| 22 | 23 | } |
|---|
| 23 | 24 | |
|---|
| 25 | +/* |
|---|
| 26 | + * INOTIFY_USER_FLAGS represents all of the mask bits that we expose to |
|---|
| 27 | + * userspace. There is at least one bit (FS_EVENT_ON_CHILD) which is |
|---|
| 28 | + * used only internally to the kernel. |
|---|
| 29 | + */ |
|---|
| 30 | +#define INOTIFY_USER_MASK (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK) |
|---|
| 31 | + |
|---|
| 32 | +static inline __u32 inotify_mark_user_mask(struct fsnotify_mark *fsn_mark) |
|---|
| 33 | +{ |
|---|
| 34 | + return fsn_mark->mask & INOTIFY_USER_MASK; |
|---|
| 35 | +} |
|---|
| 36 | + |
|---|
| 24 | 37 | extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, |
|---|
| 25 | 38 | struct fsnotify_group *group); |
|---|
| 26 | | -extern int inotify_handle_event(struct fsnotify_group *group, |
|---|
| 27 | | - struct inode *inode, |
|---|
| 28 | | - u32 mask, const void *data, int data_type, |
|---|
| 29 | | - const unsigned char *file_name, u32 cookie, |
|---|
| 30 | | - struct fsnotify_iter_info *iter_info); |
|---|
| 39 | +extern int inotify_handle_inode_event(struct fsnotify_mark *inode_mark, |
|---|
| 40 | + u32 mask, struct inode *inode, |
|---|
| 41 | + struct inode *dir, |
|---|
| 42 | + const struct qstr *name, u32 cookie); |
|---|
| 31 | 43 | |
|---|
| 32 | 44 | extern const struct fsnotify_ops inotify_fsnotify_ops; |
|---|
| 33 | 45 | extern struct kmem_cache *inotify_inode_mark_cachep; |
|---|