diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 20:30:52 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:31 -0400 |
commit | 2dfc1cae4c42b93b831b2417540df2b895ab7108 (patch) | |
tree | e07a0075964fd2cb9210b302114255e16ab1d4c0 /include/linux/fsnotify.h | |
parent | 7050c48826d5adb2210bddfb6a67aa13bbe984ed (diff) |
inotify: remove inotify in kernel interface
nothing uses inotify in the kernel, drop it!
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 01755909ce81..f958e93feb97 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -11,8 +11,6 @@ | |||
11 | * (C) Copyright 2005 Robert Love | 11 | * (C) Copyright 2005 Robert Love |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/dnotify.h> | ||
15 | #include <linux/inotify.h> | ||
16 | #include <linux/fsnotify_backend.h> | 14 | #include <linux/fsnotify_backend.h> |
17 | #include <linux/audit.h> | 15 | #include <linux/audit.h> |
18 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
@@ -25,16 +23,12 @@ static inline void fsnotify_d_instantiate(struct dentry *entry, | |||
25 | struct inode *inode) | 23 | struct inode *inode) |
26 | { | 24 | { |
27 | __fsnotify_d_instantiate(entry, inode); | 25 | __fsnotify_d_instantiate(entry, inode); |
28 | |||
29 | inotify_d_instantiate(entry, inode); | ||
30 | } | 26 | } |
31 | 27 | ||
32 | /* Notify this dentry's parent about a child's events. */ | 28 | /* Notify this dentry's parent about a child's events. */ |
33 | static inline void fsnotify_parent(struct dentry *dentry, __u32 mask) | 29 | static inline void fsnotify_parent(struct dentry *dentry, __u32 mask) |
34 | { | 30 | { |
35 | __fsnotify_parent(dentry, mask); | 31 | __fsnotify_parent(dentry, mask); |
36 | |||
37 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | ||
38 | } | 32 | } |
39 | 33 | ||
40 | /* | 34 | /* |
@@ -48,8 +42,6 @@ static inline void fsnotify_d_move(struct dentry *entry) | |||
48 | * cares about events from this entry. | 42 | * cares about events from this entry. |
49 | */ | 43 | */ |
50 | __fsnotify_update_dcache_flags(entry); | 44 | __fsnotify_update_dcache_flags(entry); |
51 | |||
52 | inotify_d_move(entry); | ||
53 | } | 45 | } |
54 | 46 | ||
55 | /* | 47 | /* |
@@ -57,8 +49,6 @@ static inline void fsnotify_d_move(struct dentry *entry) | |||
57 | */ | 49 | */ |
58 | static inline void fsnotify_link_count(struct inode *inode) | 50 | static inline void fsnotify_link_count(struct inode *inode) |
59 | { | 51 | { |
60 | inotify_inode_queue_event(inode, IN_ATTRIB, 0, NULL, NULL); | ||
61 | |||
62 | fsnotify(inode, FS_ATTRIB, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 52 | fsnotify(inode, FS_ATTRIB, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
63 | } | 53 | } |
64 | 54 | ||
@@ -70,7 +60,6 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
70 | int isdir, struct inode *target, struct dentry *moved) | 60 | int isdir, struct inode *target, struct dentry *moved) |
71 | { | 61 | { |
72 | struct inode *source = moved->d_inode; | 62 | struct inode *source = moved->d_inode; |
73 | u32 in_cookie = inotify_get_cookie(); | ||
74 | u32 fs_cookie = fsnotify_get_cookie(); | 63 | u32 fs_cookie = fsnotify_get_cookie(); |
75 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); | 64 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); |
76 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); | 65 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); |
@@ -80,31 +69,18 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
80 | old_dir_mask |= FS_DN_RENAME; | 69 | old_dir_mask |= FS_DN_RENAME; |
81 | 70 | ||
82 | if (isdir) { | 71 | if (isdir) { |
83 | isdir = IN_ISDIR; | ||
84 | old_dir_mask |= FS_IN_ISDIR; | 72 | old_dir_mask |= FS_IN_ISDIR; |
85 | new_dir_mask |= FS_IN_ISDIR; | 73 | new_dir_mask |= FS_IN_ISDIR; |
86 | } | 74 | } |
87 | 75 | ||
88 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir, in_cookie, old_name, | ||
89 | source); | ||
90 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, in_cookie, new_name, | ||
91 | source); | ||
92 | |||
93 | fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie); | 76 | fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie); |
94 | fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE, new_name, fs_cookie); | 77 | fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE, new_name, fs_cookie); |
95 | 78 | ||
96 | if (target) { | 79 | if (target) |
97 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL); | ||
98 | inotify_inode_is_dead(target); | ||
99 | |||
100 | /* this is really a link_count change not a removal */ | ||
101 | fsnotify_link_count(target); | 80 | fsnotify_link_count(target); |
102 | } | ||
103 | 81 | ||
104 | if (source) { | 82 | if (source) |
105 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | ||
106 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 83 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
107 | } | ||
108 | audit_inode_child(moved, new_dir); | 84 | audit_inode_child(moved, new_dir); |
109 | } | 85 | } |
110 | 86 | ||
@@ -134,9 +110,6 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) | |||
134 | */ | 110 | */ |
135 | static inline void fsnotify_inoderemove(struct inode *inode) | 111 | static inline void fsnotify_inoderemove(struct inode *inode) |
136 | { | 112 | { |
137 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL, NULL); | ||
138 | inotify_inode_is_dead(inode); | ||
139 | |||
140 | fsnotify(inode, FS_DELETE_SELF, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 113 | fsnotify(inode, FS_DELETE_SELF, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
141 | __fsnotify_inode_delete(inode); | 114 | __fsnotify_inode_delete(inode); |
142 | } | 115 | } |
@@ -146,8 +119,6 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
146 | */ | 119 | */ |
147 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | 120 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
148 | { | 121 | { |
149 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | ||
150 | dentry->d_inode); | ||
151 | audit_inode_child(dentry, inode); | 122 | audit_inode_child(dentry, inode); |
152 | 123 | ||
153 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 124 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
@@ -160,8 +131,6 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
160 | */ | 131 | */ |
161 | static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) | 132 | static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) |
162 | { | 133 | { |
163 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, | ||
164 | inode); | ||
165 | fsnotify_link_count(inode); | 134 | fsnotify_link_count(inode); |
166 | audit_inode_child(new_dentry, dir); | 135 | audit_inode_child(new_dentry, dir); |
167 | 136 | ||
@@ -176,7 +145,6 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
176 | __u32 mask = (FS_CREATE | FS_IN_ISDIR); | 145 | __u32 mask = (FS_CREATE | FS_IN_ISDIR); |
177 | struct inode *d_inode = dentry->d_inode; | 146 | struct inode *d_inode = dentry->d_inode; |
178 | 147 | ||
179 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); | ||
180 | audit_inode_child(dentry, inode); | 148 | audit_inode_child(dentry, inode); |
181 | 149 | ||
182 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 150 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
@@ -193,8 +161,6 @@ static inline void fsnotify_access(struct dentry *dentry) | |||
193 | if (S_ISDIR(inode->i_mode)) | 161 | if (S_ISDIR(inode->i_mode)) |
194 | mask |= FS_IN_ISDIR; | 162 | mask |= FS_IN_ISDIR; |
195 | 163 | ||
196 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
197 | |||
198 | fsnotify_parent(dentry, mask); | 164 | fsnotify_parent(dentry, mask); |
199 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 165 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
200 | } | 166 | } |
@@ -210,8 +176,6 @@ static inline void fsnotify_modify(struct dentry *dentry) | |||
210 | if (S_ISDIR(inode->i_mode)) | 176 | if (S_ISDIR(inode->i_mode)) |
211 | mask |= FS_IN_ISDIR; | 177 | mask |= FS_IN_ISDIR; |
212 | 178 | ||
213 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
214 | |||
215 | fsnotify_parent(dentry, mask); | 179 | fsnotify_parent(dentry, mask); |
216 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 180 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
217 | } | 181 | } |
@@ -227,8 +191,6 @@ static inline void fsnotify_open(struct dentry *dentry) | |||
227 | if (S_ISDIR(inode->i_mode)) | 191 | if (S_ISDIR(inode->i_mode)) |
228 | mask |= FS_IN_ISDIR; | 192 | mask |= FS_IN_ISDIR; |
229 | 193 | ||
230 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
231 | |||
232 | fsnotify_parent(dentry, mask); | 194 | fsnotify_parent(dentry, mask); |
233 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 195 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
234 | } | 196 | } |
@@ -246,8 +208,6 @@ static inline void fsnotify_close(struct file *file) | |||
246 | if (S_ISDIR(inode->i_mode)) | 208 | if (S_ISDIR(inode->i_mode)) |
247 | mask |= FS_IN_ISDIR; | 209 | mask |= FS_IN_ISDIR; |
248 | 210 | ||
249 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
250 | |||
251 | fsnotify_parent(dentry, mask); | 211 | fsnotify_parent(dentry, mask); |
252 | fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0); | 212 | fsnotify(inode, mask, file, FSNOTIFY_EVENT_FILE, NULL, 0); |
253 | } | 213 | } |
@@ -263,8 +223,6 @@ static inline void fsnotify_xattr(struct dentry *dentry) | |||
263 | if (S_ISDIR(inode->i_mode)) | 223 | if (S_ISDIR(inode->i_mode)) |
264 | mask |= FS_IN_ISDIR; | 224 | mask |= FS_IN_ISDIR; |
265 | 225 | ||
266 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
267 | |||
268 | fsnotify_parent(dentry, mask); | 226 | fsnotify_parent(dentry, mask); |
269 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 227 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
270 | } | 228 | } |
@@ -299,14 +257,12 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) | |||
299 | if (mask) { | 257 | if (mask) { |
300 | if (S_ISDIR(inode->i_mode)) | 258 | if (S_ISDIR(inode->i_mode)) |
301 | mask |= FS_IN_ISDIR; | 259 | mask |= FS_IN_ISDIR; |
302 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); | ||
303 | |||
304 | fsnotify_parent(dentry, mask); | 260 | fsnotify_parent(dentry, mask); |
305 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 261 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
306 | } | 262 | } |
307 | } | 263 | } |
308 | 264 | ||
309 | #if defined(CONFIG_INOTIFY) || defined(CONFIG_FSNOTIFY) /* notify helpers */ | 265 | #if defined(CONFIG_FSNOTIFY) /* notify helpers */ |
310 | 266 | ||
311 | /* | 267 | /* |
312 | * fsnotify_oldname_init - save off the old filename before we change it | 268 | * fsnotify_oldname_init - save off the old filename before we change it |