From ebbb973271e26175c832a6ec5dfc515e7473a9af Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Wed, 4 Dec 2019 14:05:14 -0800 Subject: [PATCH] Base: Remove some unnecessary reentrancy guards. The ehooks module will now call these if necessary. --- src/base.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/base.c b/src/base.c index a1b45d06..79736cdc 100644 --- a/src/base.c +++ b/src/base.c @@ -79,25 +79,21 @@ base_unmap(tsdn_t *tsdn, ehooks_t *ehooks, unsigned ind, void *addr, /* Nothing worked. This should never happen. */ not_reached(); } else { - tsd_t *tsd = tsdn_null(tsdn) ? tsd_fetch() : tsdn_tsd(tsdn); - pre_reentrancy(tsd, NULL); if (!ehooks_dalloc(tsdn, ehooks, addr, size, true, ind)) { - goto label_post_reentrancy; + goto label_done; } if (!ehooks_decommit(tsdn, ehooks, addr, size, 0, size, ind)) { - goto label_post_reentrancy; + goto label_done; } if (!ehooks_purge_forced(tsdn, ehooks, addr, size, 0, size, ind)) { - goto label_post_reentrancy; + goto label_done; } if (!ehooks_purge_lazy(tsdn, ehooks, addr, size, 0, size, ind)) { - goto label_post_reentrancy; + goto label_done; } /* Nothing worked. That's the application's problem. */ - label_post_reentrancy: - post_reentrancy(tsd); } label_done: if (metadata_thp_madvise()) {