Skip to content
  • Jan Kara's avatar
    audit: Simplify locking around untag_chunk() · 8432c700
    Jan Kara authored
    
    
    untag_chunk() has to be called with hash_lock, it drops it and
    reacquires it when returning. The unlocking of hash_lock is thus hidden
    from the callers of untag_chunk() with is rather error prone. Reorganize
    the code so that untag_chunk() is called without hash_lock, only with
    mark reference preventing the chunk from going away.
    
    Since this requires some more code in the caller of untag_chunk() to
    assure forward progress, factor out loop pruning tree from all chunks
    into a common helper function.
    
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Reviewed-by: default avatarRichard Guy Briggs <rgb@redhat.com>
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
    8432c700