diff options
Diffstat (limited to 'include/linux/dnotify.h')
| -rw-r--r-- | include/linux/dnotify.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h index 102a902b4396..ecc06286226d 100644 --- a/include/linux/dnotify.h +++ b/include/linux/dnotify.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | struct dnotify_struct { | 11 | struct dnotify_struct { |
| 12 | struct dnotify_struct * dn_next; | 12 | struct dnotify_struct * dn_next; |
| 13 | unsigned long dn_mask; | 13 | __u32 dn_mask; |
| 14 | int dn_fd; | 14 | int dn_fd; |
| 15 | struct file * dn_filp; | 15 | struct file * dn_filp; |
| 16 | fl_owner_t dn_owner; | 16 | fl_owner_t dn_owner; |
| @@ -21,23 +21,18 @@ struct dnotify_struct { | |||
| 21 | 21 | ||
| 22 | #ifdef CONFIG_DNOTIFY | 22 | #ifdef CONFIG_DNOTIFY |
| 23 | 23 | ||
| 24 | extern void __inode_dir_notify(struct inode *, unsigned long); | 24 | #define DNOTIFY_ALL_EVENTS (FS_DELETE | FS_DELETE_CHILD |\ |
| 25 | FS_MODIFY | FS_MODIFY_CHILD |\ | ||
| 26 | FS_ACCESS | FS_ACCESS_CHILD |\ | ||
| 27 | FS_ATTRIB | FS_ATTRIB_CHILD |\ | ||
| 28 | FS_CREATE | FS_DN_RENAME |\ | ||
| 29 | FS_MOVED_FROM | FS_MOVED_TO) | ||
| 30 | |||
| 25 | extern void dnotify_flush(struct file *, fl_owner_t); | 31 | extern void dnotify_flush(struct file *, fl_owner_t); |
| 26 | extern int fcntl_dirnotify(int, struct file *, unsigned long); | 32 | extern int fcntl_dirnotify(int, struct file *, unsigned long); |
| 27 | extern void dnotify_parent(struct dentry *, unsigned long); | ||
| 28 | |||
| 29 | static inline void inode_dir_notify(struct inode *inode, unsigned long event) | ||
| 30 | { | ||
| 31 | if (inode->i_dnotify_mask & (event)) | ||
| 32 | __inode_dir_notify(inode, event); | ||
| 33 | } | ||
| 34 | 33 | ||
| 35 | #else | 34 | #else |
| 36 | 35 | ||
| 37 | static inline void __inode_dir_notify(struct inode *inode, unsigned long event) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | static inline void dnotify_flush(struct file *filp, fl_owner_t id) | 36 | static inline void dnotify_flush(struct file *filp, fl_owner_t id) |
| 42 | { | 37 | { |
| 43 | } | 38 | } |
| @@ -47,14 +42,6 @@ static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) | |||
| 47 | return -EINVAL; | 42 | return -EINVAL; |
| 48 | } | 43 | } |
| 49 | 44 | ||
| 50 | static inline void dnotify_parent(struct dentry *dentry, unsigned long event) | ||
| 51 | { | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline void inode_dir_notify(struct inode *inode, unsigned long event) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | |||
| 58 | #endif /* CONFIG_DNOTIFY */ | 45 | #endif /* CONFIG_DNOTIFY */ |
| 59 | 46 | ||
| 60 | #endif /* __KERNEL __ */ | 47 | #endif /* __KERNEL __ */ |
