• Jan Kara's avatar
    audit_tree: Remove mark->lock locking · 9f16d2e6
    Jan Kara authored
    
    
    Currently, audit_tree code uses mark->lock to protect against detaching
    of mark from an inode. In most places it however also uses
    mark->group->mark_mutex (as we need to atomically replace attached
    marks) and this provides protection against mark detaching as well. So
    just remove protection with mark->lock from audit tree code and replace
    it with mark->group->mark_mutex protection in all the places. It
    simplifies the code and gets rid of some ugly catches like calling
    fsnotify_add_mark_locked() with mark->lock held (which cannot sleep only
    because we hold a reference to another mark attached to the same inode).
    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>
    9f16d2e6
audit_tree.c 23.4 KB