diff options
author | Amy Griffis <amy.griffis@hp.com> | 2006-06-01 16:11:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 05:25:19 -0400 |
commit | 3ca10067f7f4bfa62a1b0edc84f590261fa02d75 (patch) | |
tree | 456e1b555cd4af838bd4e833aa7589ab2bab6766 /include/linux/inotify.h | |
parent | a9dc971d3fdb857a2bcd6d53238125a2cd31d5f4 (diff) |
[PATCH] inotify (4/5): allow watch removal from event handler
Allow callers to remove watches from their event handler via
inotify_remove_watch_locked(). This functionality can be used to
achieve IN_ONESHOT-like functionality for a subset of events in the
mask.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Acked-by: Robert Love <rml@novell.com>
Acked-by: John McCutchan <john@johnmccutchan.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/inotify.h')
-rw-r--r-- | include/linux/inotify.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index e7e7fb7fc778..d4f48c6402e6 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -122,6 +122,8 @@ extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *, | |||
122 | struct inode *, __u32); | 122 | struct inode *, __u32); |
123 | extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); | 123 | extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); |
124 | extern int inotify_rm_wd(struct inotify_handle *, __u32); | 124 | extern int inotify_rm_wd(struct inotify_handle *, __u32); |
125 | extern void inotify_remove_watch_locked(struct inotify_handle *, | ||
126 | struct inotify_watch *); | ||
125 | extern void get_inotify_watch(struct inotify_watch *); | 127 | extern void get_inotify_watch(struct inotify_watch *); |
126 | extern void put_inotify_watch(struct inotify_watch *); | 128 | extern void put_inotify_watch(struct inotify_watch *); |
127 | 129 | ||
@@ -205,6 +207,11 @@ static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd) | |||
205 | return -EOPNOTSUPP; | 207 | return -EOPNOTSUPP; |
206 | } | 208 | } |
207 | 209 | ||
210 | static inline void inotify_remove_watch_locked(struct inotify_handle *ih, | ||
211 | struct inotify_watch *watch) | ||
212 | { | ||
213 | } | ||
214 | |||
208 | static inline void get_inotify_watch(struct inotify_watch *watch) | 215 | static inline void get_inotify_watch(struct inotify_watch *watch) |
209 | { | 216 | { |
210 | } | 217 | } |