diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:27 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:57 -0400 |
commit | 5444e2981c31d0ed7465475e451b8437084337e5 (patch) | |
tree | 66b6d84b7aab886b44a3467a139d258d9aba09df /kernel | |
parent | 32c3263221bd63316815286dccacdc7abfd7f3c4 (diff) |
fsnotify: split generic and inode specific mark code
currently all marking is done by functions in inode-mark.c. Some of this
is pretty generic and should be instead done in a generic function and we
should only put the inode specific code in inode-mark.c
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit_tree.c | 8 | ||||
-rw-r--r-- | kernel/audit_watch.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 80f8ac328aad..cfb97d752a61 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -259,7 +259,7 @@ static void untag_chunk(struct node *p) | |||
259 | if (!new) | 259 | if (!new) |
260 | goto Fallback; | 260 | goto Fallback; |
261 | fsnotify_duplicate_mark(&new->mark, entry); | 261 | fsnotify_duplicate_mark(&new->mark, entry); |
262 | if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.i.inode, 1)) { | 262 | if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.i.inode, NULL, 1)) { |
263 | free_chunk(new); | 263 | free_chunk(new); |
264 | goto Fallback; | 264 | goto Fallback; |
265 | } | 265 | } |
@@ -322,7 +322,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree) | |||
322 | return -ENOMEM; | 322 | return -ENOMEM; |
323 | 323 | ||
324 | entry = &chunk->mark; | 324 | entry = &chunk->mark; |
325 | if (fsnotify_add_mark(entry, audit_tree_group, inode, 0)) { | 325 | if (fsnotify_add_mark(entry, audit_tree_group, inode, NULL, 0)) { |
326 | free_chunk(chunk); | 326 | free_chunk(chunk); |
327 | return -ENOSPC; | 327 | return -ENOSPC; |
328 | } | 328 | } |
@@ -360,7 +360,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
360 | struct node *p; | 360 | struct node *p; |
361 | int n; | 361 | int n; |
362 | 362 | ||
363 | old_entry = fsnotify_find_mark(audit_tree_group, inode); | 363 | old_entry = fsnotify_find_inode_mark(audit_tree_group, inode); |
364 | if (!old_entry) | 364 | if (!old_entry) |
365 | return create_chunk(inode, tree); | 365 | return create_chunk(inode, tree); |
366 | 366 | ||
@@ -395,7 +395,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
395 | } | 395 | } |
396 | 396 | ||
397 | fsnotify_duplicate_mark(chunk_entry, old_entry); | 397 | fsnotify_duplicate_mark(chunk_entry, old_entry); |
398 | if (fsnotify_add_mark(chunk_entry, chunk_entry->group, chunk_entry->i.inode, 1)) { | 398 | if (fsnotify_add_mark(chunk_entry, chunk_entry->group, chunk_entry->i.inode, NULL, 1)) { |
399 | spin_unlock(&old_entry->lock); | 399 | spin_unlock(&old_entry->lock); |
400 | free_chunk(chunk); | 400 | free_chunk(chunk); |
401 | fsnotify_put_mark(old_entry); | 401 | fsnotify_put_mark(old_entry); |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index d85fa538a722..7499397a6100 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -101,7 +101,7 @@ static inline struct audit_parent *audit_find_parent(struct inode *inode) | |||
101 | struct audit_parent *parent = NULL; | 101 | struct audit_parent *parent = NULL; |
102 | struct fsnotify_mark *entry; | 102 | struct fsnotify_mark *entry; |
103 | 103 | ||
104 | entry = fsnotify_find_mark(audit_watch_group, inode); | 104 | entry = fsnotify_find_inode_mark(audit_watch_group, inode); |
105 | if (entry) | 105 | if (entry) |
106 | parent = container_of(entry, struct audit_parent, mark); | 106 | parent = container_of(entry, struct audit_parent, mark); |
107 | 107 | ||
@@ -158,7 +158,7 @@ static struct audit_parent *audit_init_parent(struct nameidata *ndp) | |||
158 | 158 | ||
159 | fsnotify_init_mark(&parent->mark, audit_watch_free_mark); | 159 | fsnotify_init_mark(&parent->mark, audit_watch_free_mark); |
160 | parent->mark.mask = AUDIT_FS_WATCH; | 160 | parent->mark.mask = AUDIT_FS_WATCH; |
161 | ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode, 0); | 161 | ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode, NULL, 0); |
162 | if (ret < 0) { | 162 | if (ret < 0) { |
163 | audit_free_parent(parent); | 163 | audit_free_parent(parent); |
164 | return ERR_PTR(ret); | 164 | return ERR_PTR(ret); |
@@ -517,7 +517,7 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i | |||
517 | struct fsnotify_mark *entry; | 517 | struct fsnotify_mark *entry; |
518 | bool send; | 518 | bool send; |
519 | 519 | ||
520 | entry = fsnotify_find_mark(group, inode); | 520 | entry = fsnotify_find_inode_mark(group, inode); |
521 | if (!entry) | 521 | if (!entry) |
522 | return false; | 522 | return false; |
523 | 523 | ||