aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dnotify.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/dnotify.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/dnotify.h')
-rw-r--r--include/linux/dnotify.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h
new file mode 100644
index 000000000000..f134a01975c7
--- /dev/null
+++ b/include/linux/dnotify.h
@@ -0,0 +1,63 @@
1#ifndef _LINUX_DNOTIFY_H
2#define _LINUX_DNOTIFY_H
3/*
4 * Directory notification for Linux
5 *
6 * Copyright (C) 2000,2002 Stephen Rothwell
7 */
8
9#include <linux/fs.h>
10
11struct 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;
17};
18
19#ifdef __KERNEL__
20
21#include <linux/config.h>
22
23#ifdef CONFIG_DNOTIFY
24
25extern void __inode_dir_notify(struct inode *, unsigned long);
26extern void dnotify_flush(struct file *, fl_owner_t);
27extern int fcntl_dirnotify(int, struct file *, unsigned long);
28extern void dnotify_parent(struct dentry *, unsigned long);
29
30static inline void inode_dir_notify(struct inode *inode, unsigned long event)
31{
32 if (inode->i_dnotify_mask & (event))
33 __inode_dir_notify(inode, event);
34}
35
36#else
37
38static inline void __inode_dir_notify(struct inode *inode, unsigned long event)
39{
40}
41
42static inline void dnotify_flush(struct file *filp, fl_owner_t id)
43{
44}
45
46static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
47{
48 return -EINVAL;
49}
50
51static inline void dnotify_parent(struct dentry *dentry, unsigned long event)
52{
53}
54
55static inline void inode_dir_notify(struct inode *inode, unsigned long event)
56{
57}
58
59#endif /* CONFIG_DNOTIFY */
60
61#endif /* __KERNEL __ */
62
63#endif /* _LINUX_DNOTIFY_H */