diff options
author | Eric Paris <eparis@redhat.com> | 2011-10-14 17:43:39 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-12-11 13:44:36 -0500 |
commit | 0a6b6bd5919a65030b557ec8fe81f6fb3e93744a (patch) | |
tree | 940e38b5cc9d7fdb5804748842b555af554ed32f /include | |
parent | 6960b0d909cde5bdff49e4e5c1250edd10be7ebd (diff) |
fsnotify: make fasync generic for both inotify and fanotify
inotify is supposed to support async signal notification when information
is available on the inotify fd. This patch moves that support to generic
fsnotify functions so it can be used by all notification mechanisms.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsnotify_backend.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 1af2f6a722c0..d5b0910d4961 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -148,6 +148,8 @@ struct fsnotify_group { | |||
148 | * a group */ | 148 | * a group */ |
149 | struct list_head marks_list; /* all inode marks for this group */ | 149 | struct list_head marks_list; /* all inode marks for this group */ |
150 | 150 | ||
151 | struct fasync_struct *fsn_fa; /* async notification */ | ||
152 | |||
151 | /* groups can define private fields here or use the void *private */ | 153 | /* groups can define private fields here or use the void *private */ |
152 | union { | 154 | union { |
153 | void *private; | 155 | void *private; |
@@ -156,7 +158,6 @@ struct fsnotify_group { | |||
156 | spinlock_t idr_lock; | 158 | spinlock_t idr_lock; |
157 | struct idr idr; | 159 | struct idr idr; |
158 | u32 last_wd; | 160 | u32 last_wd; |
159 | struct fasync_struct *fa; /* async notification */ | ||
160 | struct user_struct *user; | 161 | struct user_struct *user; |
161 | } inotify_data; | 162 | } inotify_data; |
162 | #endif | 163 | #endif |
@@ -368,6 +369,8 @@ extern void fsnotify_get_group(struct fsnotify_group *group); | |||
368 | extern void fsnotify_put_group(struct fsnotify_group *group); | 369 | extern void fsnotify_put_group(struct fsnotify_group *group); |
369 | /* destroy group */ | 370 | /* destroy group */ |
370 | extern void fsnotify_destroy_group(struct fsnotify_group *group); | 371 | extern void fsnotify_destroy_group(struct fsnotify_group *group); |
372 | /* fasync handler function */ | ||
373 | extern int fsnotify_fasync(int fd, struct file *file, int on); | ||
371 | /* take a reference to an event */ | 374 | /* take a reference to an event */ |
372 | extern void fsnotify_get_event(struct fsnotify_event *event); | 375 | extern void fsnotify_get_event(struct fsnotify_event *event); |
373 | extern void fsnotify_put_event(struct fsnotify_event *event); | 376 | extern void fsnotify_put_event(struct fsnotify_event *event); |