diff options
author | Jan Kara <jack@suse.cz> | 2018-11-12 09:54:48 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-11-12 09:54:48 -0500 |
commit | 8cd0feb5234ccda3c15de35b40c8010a406dfc03 (patch) | |
tree | 1b0250ff689bfbdd9eb11b124ff5a06abcc46da1 /kernel/audit_tree.c | |
parent | d31b326d3ce7b1ff2ec36470dfcccb14a6c3e04e (diff) |
audit: Remove pointless check in insert_hash()
The audit_tree_group->mark_mutex is held all the time while we create
the fsnotify mark, add it to the inode, and insert chunk into the hash.
Hence mark cannot get detached during this time and so the check whether
the mark is attached in insert_hash() is pointless.
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r-- | kernel/audit_tree.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index d8f6cfa0005b..d150514ff15e 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c @@ -184,8 +184,6 @@ static void insert_hash(struct audit_chunk *chunk) { struct list_head *list; - if (!(chunk->mark.flags & FSNOTIFY_MARK_FLAG_ATTACHED)) - return; /* * Make sure chunk is fully initialized before making it visible in the * hash. Pairs with a data dependency barrier in READ_ONCE() in |