aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit_tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-16 16:06:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-16 16:06:18 -0400
commitdbb2816fc78abb0282a803bea1119e2f31354b20 (patch)
tree5122c31321a6afcf8f9b99d823a22eba577f80d3 /kernel/audit_tree.c
parent644f2639aef0c7a9a4f59b679375719d720d5461 (diff)
parentb249f5be6165811749b04a927806056c198222b1 (diff)
Merge tag 'fsnotify_for_v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara: "fsnotify cleanups unifying handling of different watch types. This is the shortened fsnotify series from Amir with the last five patches pulled out. Amir has modified those patches to not change struct inode but obviously it's too late for those to go into this merge window" * tag 'fsnotify_for_v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: add fsnotify_add_inode_mark() wrappers fanotify: generalize fanotify_should_send_event() fsnotify: generalize send_to_group() fsnotify: generalize iteration of marks by object type fsnotify: introduce marks iteration helpers fsnotify: remove redundant arguments to handle_event() fsnotify: use type id to identify connector object type
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r--kernel/audit_tree.c12
1 files changed, 5 insertions, 7 deletions
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)