audit: Always call pthread_once in osi_audit_init 03/14403/4
authorAndrew Deason <adeason@sinenomine.net>
Mon, 19 Oct 2020 21:07:44 +0000 (16:07 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 1 Nov 2020 18:11:48 +0000 (13:11 -0500)
commit52c4bf4d18a82d70016b584db95ab66aaa7ffb15
tree154a6763f69de3989c6d8b345f810c32d801ccd1
parente83347ce6ada6576bb8cd6f2719540a5565b09c0
audit: Always call pthread_once in osi_audit_init

Currently, we skip the pthread_once call in osi_audit_init if
audit_lock_initialized is set. But this is somewhat pointless, since
pthread_once will effectively do this check itself, and better (it
will wait if osi_audit_init is actively running in another thread).

So just get rid of audit_lock_initialized, and replace the other
assert for audit_lock_initialized with another plain pthread_once
call.

Change-Id: I466c8ec2d1516edecaae23d4354892e7e3a88918
Reviewed-on: https://gerrit.openafs.org/14403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/audit/audit.c