0001
0002 #ifndef _LINUX_DNOTIFY_H
0003 #define _LINUX_DNOTIFY_H
0004
0005
0006
0007
0008
0009
0010 #include <linux/fs.h>
0011
0012 struct dnotify_struct {
0013 struct dnotify_struct * dn_next;
0014 __u32 dn_mask;
0015 int dn_fd;
0016 struct file * dn_filp;
0017 fl_owner_t dn_owner;
0018 };
0019
0020 #ifdef __KERNEL__
0021
0022
0023 #ifdef CONFIG_DNOTIFY
0024
0025 #define DNOTIFY_ALL_EVENTS (FS_DELETE | FS_DELETE_CHILD |\
0026 FS_MODIFY | FS_MODIFY_CHILD |\
0027 FS_ACCESS | FS_ACCESS_CHILD |\
0028 FS_ATTRIB | FS_ATTRIB_CHILD |\
0029 FS_CREATE | FS_RENAME |\
0030 FS_MOVED_FROM | FS_MOVED_TO)
0031
0032 extern void dnotify_flush(struct file *, fl_owner_t);
0033 extern int fcntl_dirnotify(int, struct file *, unsigned long);
0034
0035 #else
0036
0037 static inline void dnotify_flush(struct file *filp, fl_owner_t id)
0038 {
0039 }
0040
0041 static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
0042 {
0043 return -EINVAL;
0044 }
0045
0046 #endif
0047
0048 #endif
0049
0050 #endif