diff options
author | Eric Paris <eparis@redhat.com> | 2009-05-21 23:02:01 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2009-06-11 20:57:54 +0200 |
commit | 63c882a05416e18de6fb59f7dd6da48f3bbe8273 (patch) | |
tree | b09cca0e3a996690c8965d9281cb1f386edd657b /include | |
parent | fsnotify: handle filesystem unmounts with fsnotify marks (diff) | |
download | linux-63c882a05416e18de6fb59f7dd6da48f3bbe8273.tar.xz linux-63c882a05416e18de6fb59f7dd6da48f3bbe8273.zip |
inotify: reimplement inotify using fsnotify
Reimplement inotify_user using fsnotify. This should be feature for feature
exactly the same as the original inotify_user. This does not make any changes
to the in kernel inotify feature used by audit. Those patches (and the eventual
removal of in kernel inotify) will come after the new inotify_user proves to be
working correctly.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsnotify_backend.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index d2c0ee30e618..44848aa830dc 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -9,6 +9,7 @@ #ifdef __KERNEL__ +#include <linux/idr.h> /* inotify uses this */ #include <linux/fs.h> /* struct inode */ #include <linux/list.h> #include <linux/path.h> /* struct path */ @@ -59,6 +60,7 @@ /* listeners that hard code group numbers near the top */ #define DNOTIFY_GROUP_NUM UINT_MAX +#define INOTIFY_GROUP_NUM (DNOTIFY_GROUP_NUM-1) struct fsnotify_group; struct fsnotify_event; @@ -141,6 +143,15 @@ struct fsnotify_group { /* groups can define private fields here or use the void *private */ union { void *private; +#ifdef CONFIG_INOTIFY_USER + struct inotify_group_private_data { + spinlock_t idr_lock; + struct idr idr; + u32 last_wd; + struct fasync_struct *fa; /* async notification */ + struct user_struct *user; + } inotify_data; +#endif }; }; |