Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cd0feb5 authored by Jan Kara's avatar Jan Kara Committed by Paul Moore
Browse files

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: default avatarRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent d31b326d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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