diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 20:30:52 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:31 -0400 |
commit | 2dfc1cae4c42b93b831b2417540df2b895ab7108 (patch) | |
tree | e07a0075964fd2cb9210b302114255e16ab1d4c0 /include/linux/inotify.h | |
parent | 7050c48826d5adb2210bddfb6a67aa13bbe984ed (diff) |
inotify: remove inotify in kernel interface
nothing uses inotify in the kernel, drop it!
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/inotify.h')
-rw-r--r-- | include/linux/inotify.h | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index 37ea2894b3c0..959a38b8f75d 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -69,178 +69,4 @@ struct inotify_event { | |||
69 | #define IN_CLOEXEC O_CLOEXEC | 69 | #define IN_CLOEXEC O_CLOEXEC |
70 | #define IN_NONBLOCK O_NONBLOCK | 70 | #define IN_NONBLOCK O_NONBLOCK |
71 | 71 | ||
72 | #ifdef __KERNEL__ | ||
73 | |||
74 | #include <linux/dcache.h> | ||
75 | #include <linux/fs.h> | ||
76 | |||
77 | /* | ||
78 | * struct inotify_watch - represents a watch request on a specific inode | ||
79 | * | ||
80 | * h_list is protected by ih->mutex of the associated inotify_handle. | ||
81 | * i_list, mask are protected by inode->inotify_mutex of the associated inode. | ||
82 | * ih, inode, and wd are never written to once the watch is created. | ||
83 | * | ||
84 | * Callers must use the established inotify interfaces to access inotify_watch | ||
85 | * contents. The content of this structure is private to the inotify | ||
86 | * implementation. | ||
87 | */ | ||
88 | struct inotify_watch { | ||
89 | struct list_head h_list; /* entry in inotify_handle's list */ | ||
90 | struct list_head i_list; /* entry in inode's list */ | ||
91 | atomic_t count; /* reference count */ | ||
92 | struct inotify_handle *ih; /* associated inotify handle */ | ||
93 | struct inode *inode; /* associated inode */ | ||
94 | __s32 wd; /* watch descriptor */ | ||
95 | __u32 mask; /* event mask for this watch */ | ||
96 | }; | ||
97 | |||
98 | struct inotify_operations { | ||
99 | void (*handle_event)(struct inotify_watch *, u32, u32, u32, | ||
100 | const char *, struct inode *); | ||
101 | void (*destroy_watch)(struct inotify_watch *); | ||
102 | }; | ||
103 | |||
104 | #ifdef CONFIG_INOTIFY | ||
105 | |||
106 | /* Kernel API for producing events */ | ||
107 | |||
108 | extern void inotify_d_instantiate(struct dentry *, struct inode *); | ||
109 | extern void inotify_d_move(struct dentry *); | ||
110 | extern void inotify_inode_queue_event(struct inode *, __u32, __u32, | ||
111 | const char *, struct inode *); | ||
112 | extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32, | ||
113 | const char *); | ||
114 | extern void inotify_unmount_inodes(struct list_head *); | ||
115 | extern void inotify_inode_is_dead(struct inode *); | ||
116 | extern u32 inotify_get_cookie(void); | ||
117 | |||
118 | /* Kernel Consumer API */ | ||
119 | |||
120 | extern struct inotify_handle *inotify_init(const struct inotify_operations *); | ||
121 | extern void inotify_init_watch(struct inotify_watch *); | ||
122 | extern void inotify_destroy(struct inotify_handle *); | ||
123 | extern __s32 inotify_find_watch(struct inotify_handle *, struct inode *, | ||
124 | struct inotify_watch **); | ||
125 | extern __s32 inotify_find_update_watch(struct inotify_handle *, struct inode *, | ||
126 | u32); | ||
127 | extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *, | ||
128 | struct inode *, __u32); | ||
129 | extern __s32 inotify_clone_watch(struct inotify_watch *, struct inotify_watch *); | ||
130 | extern void inotify_evict_watch(struct inotify_watch *); | ||
131 | extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); | ||
132 | extern int inotify_rm_wd(struct inotify_handle *, __u32); | ||
133 | extern void inotify_remove_watch_locked(struct inotify_handle *, | ||
134 | struct inotify_watch *); | ||
135 | extern void get_inotify_watch(struct inotify_watch *); | ||
136 | extern void put_inotify_watch(struct inotify_watch *); | ||
137 | extern int pin_inotify_watch(struct inotify_watch *); | ||
138 | extern void unpin_inotify_watch(struct inotify_watch *); | ||
139 | |||
140 | #else | ||
141 | |||
142 | static inline void inotify_d_instantiate(struct dentry *dentry, | ||
143 | struct inode *inode) | ||
144 | { | ||
145 | } | ||
146 | |||
147 | static inline void inotify_d_move(struct dentry *dentry) | ||
148 | { | ||
149 | } | ||
150 | |||
151 | static inline void inotify_inode_queue_event(struct inode *inode, | ||
152 | __u32 mask, __u32 cookie, | ||
153 | const char *filename, | ||
154 | struct inode *n_inode) | ||
155 | { | ||
156 | } | ||
157 | |||
158 | static inline void inotify_dentry_parent_queue_event(struct dentry *dentry, | ||
159 | __u32 mask, __u32 cookie, | ||
160 | const char *filename) | ||
161 | { | ||
162 | } | ||
163 | |||
164 | static inline void inotify_unmount_inodes(struct list_head *list) | ||
165 | { | ||
166 | } | ||
167 | |||
168 | static inline void inotify_inode_is_dead(struct inode *inode) | ||
169 | { | ||
170 | } | ||
171 | |||
172 | static inline u32 inotify_get_cookie(void) | ||
173 | { | ||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops) | ||
178 | { | ||
179 | return ERR_PTR(-EOPNOTSUPP); | ||
180 | } | ||
181 | |||
182 | static inline void inotify_init_watch(struct inotify_watch *watch) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | static inline void inotify_destroy(struct inotify_handle *ih) | ||
187 | { | ||
188 | } | ||
189 | |||
190 | static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, | ||
191 | struct inotify_watch **watchp) | ||
192 | { | ||
193 | return -EOPNOTSUPP; | ||
194 | } | ||
195 | |||
196 | static inline __s32 inotify_find_update_watch(struct inotify_handle *ih, | ||
197 | struct inode *inode, u32 mask) | ||
198 | { | ||
199 | return -EOPNOTSUPP; | ||
200 | } | ||
201 | |||
202 | static inline __s32 inotify_add_watch(struct inotify_handle *ih, | ||
203 | struct inotify_watch *watch, | ||
204 | struct inode *inode, __u32 mask) | ||
205 | { | ||
206 | return -EOPNOTSUPP; | ||
207 | } | ||
208 | |||
209 | static inline int inotify_rm_watch(struct inotify_handle *ih, | ||
210 | struct inotify_watch *watch) | ||
211 | { | ||
212 | return -EOPNOTSUPP; | ||
213 | } | ||
214 | |||
215 | static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd) | ||
216 | { | ||
217 | return -EOPNOTSUPP; | ||
218 | } | ||
219 | |||
220 | static inline void inotify_remove_watch_locked(struct inotify_handle *ih, | ||
221 | struct inotify_watch *watch) | ||
222 | { | ||
223 | } | ||
224 | |||
225 | static inline void get_inotify_watch(struct inotify_watch *watch) | ||
226 | { | ||
227 | } | ||
228 | |||
229 | static inline void put_inotify_watch(struct inotify_watch *watch) | ||
230 | { | ||
231 | } | ||
232 | |||
233 | extern inline int pin_inotify_watch(struct inotify_watch *watch) | ||
234 | { | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | extern inline void unpin_inotify_watch(struct inotify_watch *watch) | ||
239 | { | ||
240 | } | ||
241 | |||
242 | #endif /* CONFIG_INOTIFY */ | ||
243 | |||
244 | #endif /* __KERNEL __ */ | ||
245 | |||
246 | #endif /* _LINUX_INOTIFY_H */ | 72 | #endif /* _LINUX_INOTIFY_H */ |