aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-05-21 17:02:01 -0400
committerEric Paris <eparis@redhat.com>2009-06-11 14:57:54 -0400
commit63c882a05416e18de6fb59f7dd6da48f3bbe8273 (patch)
treeb09cca0e3a996690c8965d9281cb1f386edd657b /include/linux/fsnotify_backend.h
parent164bc6195139047faaf5ada1278332e99494803b (diff)
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/linux/fsnotify_backend.h')
-rw-r--r--include/linux/fsnotify_backend.h11
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 @@
9 9
10#ifdef __KERNEL__ 10#ifdef __KERNEL__
11 11
12#include <linux/idr.h> /* inotify uses this */
12#include <linux/fs.h> /* struct inode */ 13#include <linux/fs.h> /* struct inode */
13#include <linux/list.h> 14#include <linux/list.h>
14#include <linux/path.h> /* struct path */ 15#include <linux/path.h> /* struct path */
@@ -59,6 +60,7 @@
59 60
60/* listeners that hard code group numbers near the top */ 61/* listeners that hard code group numbers near the top */
61#define DNOTIFY_GROUP_NUM UINT_MAX 62#define DNOTIFY_GROUP_NUM UINT_MAX
63#define INOTIFY_GROUP_NUM (DNOTIFY_GROUP_NUM-1)
62 64
63struct fsnotify_group; 65struct fsnotify_group;
64struct fsnotify_event; 66struct fsnotify_event;
@@ -141,6 +143,15 @@ struct fsnotify_group {
141 /* groups can define private fields here or use the void *private */ 143 /* groups can define private fields here or use the void *private */
142 union { 144 union {
143 void *private; 145 void *private;
146#ifdef CONFIG_INOTIFY_USER
147 struct inotify_group_private_data {
148 spinlock_t idr_lock;
149 struct idr idr;
150 u32 last_wd;
151 struct fasync_struct *fa; /* async notification */
152 struct user_struct *user;
153 } inotify_data;
154#endif
144 }; 155 };
145}; 156};
146 157