diff options
author | Eric Paris <eparis@redhat.com> | 2011-10-14 23:43:39 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-12-11 19:44:36 +0100 |
commit | 0a6b6bd5919a65030b557ec8fe81f6fb3e93744a (patch) | |
tree | 940e38b5cc9d7fdb5804748842b555af554ed32f /include | |
parent | fsnotify: change locking order (diff) | |
download | linux-0a6b6bd5919a65030b557ec8fe81f6fb3e93744a.tar.xz linux-0a6b6bd5919a65030b557ec8fe81f6fb3e93744a.zip |
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 { * a group */ struct list_head marks_list; /* all inode marks for this group */ + struct fasync_struct *fsn_fa; /* async notification */ + /* groups can define private fields here or use the void *private */ union { void *private; @@ -156,7 +158,6 @@ struct fsnotify_group { spinlock_t idr_lock; struct idr idr; u32 last_wd; - struct fasync_struct *fa; /* async notification */ struct user_struct *user; } inotify_data; #endif @@ -368,6 +369,8 @@ extern void fsnotify_get_group(struct fsnotify_group *group); extern void fsnotify_put_group(struct fsnotify_group *group); /* destroy group */ extern void fsnotify_destroy_group(struct fsnotify_group *group); +/* fasync handler function */ +extern int fsnotify_fasync(int fd, struct file *file, int on); /* take a reference to an event */ extern void fsnotify_get_event(struct fsnotify_event *event); extern void fsnotify_put_event(struct fsnotify_event *event); |