aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_fsnotify.c5
-rw-r--r--kernel/audit_tree.c12
-rw-r--r--kernel/audit_watch.c5
3 files changed, 9 insertions, 13 deletions
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index 52f368b6561e..fba78047fb37 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -109,7 +109,7 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa
109 audit_update_mark(audit_mark, dentry->d_inode); 109 audit_update_mark(audit_mark, dentry->d_inode);
110 audit_mark->rule = krule; 110 audit_mark->rule = krule;
111 111
112 ret = fsnotify_add_mark(&audit_mark->mark, inode, NULL, true); 112 ret = fsnotify_add_inode_mark(&audit_mark->mark, inode, true);
113 if (ret < 0) { 113 if (ret < 0) {
114 fsnotify_put_mark(&audit_mark->mark); 114 fsnotify_put_mark(&audit_mark->mark);
115 audit_mark = ERR_PTR(ret); 115 audit_mark = ERR_PTR(ret);
@@ -165,12 +165,11 @@ static void audit_autoremove_mark_rule(struct audit_fsnotify_mark *audit_mark)
165/* Update mark data in audit rules based on fsnotify events. */ 165/* Update mark data in audit rules based on fsnotify events. */
166static int audit_mark_handle_event(struct fsnotify_group *group, 166static int audit_mark_handle_event(struct fsnotify_group *group,
167 struct inode *to_tell, 167 struct inode *to_tell,
168 struct fsnotify_mark *inode_mark,
169 struct fsnotify_mark *vfsmount_mark,
170 u32 mask, const void *data, int data_type, 168 u32 mask, const void *data, int data_type,
171 const unsigned char *dname, u32 cookie, 169 const unsigned char *dname, u32 cookie,
172 struct fsnotify_iter_info *iter_info) 170 struct fsnotify_iter_info *iter_info)
173{ 171{
172 struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
174 struct audit_fsnotify_mark *audit_mark; 173 struct audit_fsnotify_mark *audit_mark;
175 const struct inode *inode = NULL; 174 const struct inode *inode = NULL;
176 175
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 67e6956c0b61..c99ebaae5abc 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -288,8 +288,8 @@ static void untag_chunk(struct node *p)
288 if (!new) 288 if (!new)
289 goto Fallback; 289 goto Fallback;
290 290
291 if (fsnotify_add_mark_locked(&new->mark, entry->connector->inode, 291 if (fsnotify_add_inode_mark_locked(&new->mark, entry->connector->inode,
292 NULL, 1)) { 292 1)) {
293 fsnotify_put_mark(&new->mark); 293 fsnotify_put_mark(&new->mark);
294 goto Fallback; 294 goto Fallback;
295 } 295 }
@@ -354,7 +354,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree)
354 return -ENOMEM; 354 return -ENOMEM;
355 355
356 entry = &chunk->mark; 356 entry = &chunk->mark;
357 if (fsnotify_add_mark(entry, inode, NULL, 0)) { 357 if (fsnotify_add_inode_mark(entry, inode, 0)) {
358 fsnotify_put_mark(entry); 358 fsnotify_put_mark(entry);
359 return -ENOSPC; 359 return -ENOSPC;
360 } 360 }
@@ -434,8 +434,8 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
434 return -ENOENT; 434 return -ENOENT;
435 } 435 }
436 436
437 if (fsnotify_add_mark_locked(chunk_entry, 437 if (fsnotify_add_inode_mark_locked(chunk_entry,
438 old_entry->connector->inode, NULL, 1)) { 438 old_entry->connector->inode, 1)) {
439 spin_unlock(&old_entry->lock); 439 spin_unlock(&old_entry->lock);
440 mutex_unlock(&old_entry->group->mark_mutex); 440 mutex_unlock(&old_entry->group->mark_mutex);
441 fsnotify_put_mark(chunk_entry); 441 fsnotify_put_mark(chunk_entry);
@@ -989,8 +989,6 @@ static void evict_chunk(struct audit_chunk *chunk)
989 989
990static int audit_tree_handle_event(struct fsnotify_group *group, 990static int audit_tree_handle_event(struct fsnotify_group *group,
991 struct inode *to_tell, 991 struct inode *to_tell,
992 struct fsnotify_mark *inode_mark,
993 struct fsnotify_mark *vfsmount_mark,
994 u32 mask, const void *data, int data_type, 992 u32 mask, const void *data, int data_type,
995 const unsigned char *file_name, u32 cookie, 993 const unsigned char *file_name, u32 cookie,
996 struct fsnotify_iter_info *iter_info) 994 struct fsnotify_iter_info *iter_info)
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index f1ba88994508..c17c0c268436 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -160,7 +160,7 @@ static struct audit_parent *audit_init_parent(struct path *path)
160 160
161 fsnotify_init_mark(&parent->mark, audit_watch_group); 161 fsnotify_init_mark(&parent->mark, audit_watch_group);
162 parent->mark.mask = AUDIT_FS_WATCH; 162 parent->mark.mask = AUDIT_FS_WATCH;
163 ret = fsnotify_add_mark(&parent->mark, inode, NULL, 0); 163 ret = fsnotify_add_inode_mark(&parent->mark, inode, 0);
164 if (ret < 0) { 164 if (ret < 0) {
165 audit_free_parent(parent); 165 audit_free_parent(parent);
166 return ERR_PTR(ret); 166 return ERR_PTR(ret);
@@ -472,12 +472,11 @@ void audit_remove_watch_rule(struct audit_krule *krule)
472/* Update watch data in audit rules based on fsnotify events. */ 472/* Update watch data in audit rules based on fsnotify events. */
473static int audit_watch_handle_event(struct fsnotify_group *group, 473static int audit_watch_handle_event(struct fsnotify_group *group,
474 struct inode *to_tell, 474 struct inode *to_tell,
475 struct fsnotify_mark *inode_mark,
476 struct fsnotify_mark *vfsmount_mark,
477 u32 mask, const void *data, int data_type, 475 u32 mask, const void *data, int data_type,
478 const unsigned char *dname, u32 cookie, 476 const unsigned char *dname, u32 cookie,
479 struct fsnotify_iter_info *iter_info) 477 struct fsnotify_iter_info *iter_info)
480{ 478{
479 struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
481 const struct inode *inode; 480 const struct inode *inode;
482 struct audit_parent *parent; 481 struct audit_parent *parent;
483 482