Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6/mini2440.git] / include / linux / dnotify.h
blobf134a01975c7342fa42b1a986b2d9d5aee86bd98
1 #ifndef _LINUX_DNOTIFY_H
2 #define _LINUX_DNOTIFY_H
3 /*
4 * Directory notification for Linux
6 * Copyright (C) 2000,2002 Stephen Rothwell
7 */
9 #include <linux/fs.h>
11 struct dnotify_struct {
12 struct dnotify_struct * dn_next;
13 unsigned long dn_mask;
14 int dn_fd;
15 struct file * dn_filp;
16 fl_owner_t dn_owner;
19 #ifdef __KERNEL__
21 #include <linux/config.h>
23 #ifdef CONFIG_DNOTIFY
25 extern void __inode_dir_notify(struct inode *, unsigned long);
26 extern void dnotify_flush(struct file *, fl_owner_t);
27 extern int fcntl_dirnotify(int, struct file *, unsigned long);
28 extern void dnotify_parent(struct dentry *, unsigned long);
30 static inline void inode_dir_notify(struct inode *inode, unsigned long event)
32 if (inode->i_dnotify_mask & (event))
33 __inode_dir_notify(inode, event);
36 #else
38 static inline void __inode_dir_notify(struct inode *inode, unsigned long event)
42 static inline void dnotify_flush(struct file *filp, fl_owner_t id)
46 static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
48 return -EINVAL;
51 static inline void dnotify_parent(struct dentry *dentry, unsigned long event)
55 static inline void inode_dir_notify(struct inode *inode, unsigned long event)
59 #endif /* CONFIG_DNOTIFY */
61 #endif /* __KERNEL __ */
63 #endif /* _LINUX_DNOTIFY_H */