perf/core: Fix race in the perf_mmap_close() function