Skip to content

Commit 8cd0feb

Browse files
jankarapcmoore
authored andcommitted
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>
1 parent d31b326 commit 8cd0feb

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎kernel/audit_tree.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ static void insert_hash(struct audit_chunk *chunk)
184184
{
185185
struct list_head *list;
186186

187-
if (!(chunk->mark.flags & FSNOTIFY_MARK_FLAG_ATTACHED))
188-
return;
189187
/*
190188
* Make sure chunk is fully initialized before making it visible in the
191189
* hash. Pairs with a data dependency barrier in READ_ONCE() in

0 commit comments

Comments
 (0)