util/log: Limit RCUCloseFILE to file closing
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 17 Apr 2022 18:30:18 +0000 (11:30 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Apr 2022 17:51:11 +0000 (10:51 -0700)
commit30f5a73ac3be6a7ade2fc049162dc85c1bed9a9a
tree7670d1fa6300585a1a687defc23580caeb6bb40d
parentd5f55fff343a9afccde8cf7c11c2e7440e21ada8
util/log: Limit RCUCloseFILE to file closing

Use FILE* for global_file.  We can perform an rcu_read on that
just as easily as RCUCloseFILE*.  This simplifies a couple of
places, where previously we required taking the rcu_read_lock
simply to avoid racing to dereference RCUCloseFile->fd.

Only allocate the RCUCloseFile prior to call_rcu.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-39-richard.henderson@linaro.org>
util/log.c