summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/support/hazard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/support/hazard.c')
-rw-r--r--src/third_party/wiredtiger/src/support/hazard.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/third_party/wiredtiger/src/support/hazard.c b/src/third_party/wiredtiger/src/support/hazard.c
index d299211ddd2..b6bacedf9ef 100644
--- a/src/third_party/wiredtiger/src/support/hazard.c
+++ b/src/third_party/wiredtiger/src/support/hazard.c
@@ -7,6 +7,7 @@
*/
#include "wt_internal.h"
+
#ifdef HAVE_DIAGNOSTIC
static void __hazard_dump(WT_SESSION_IMPL *);
#endif
@@ -50,8 +51,7 @@ hazard_grow(WT_SESSION_IMPL *session)
* leak the memory.
*/
__wt_gen_next(session, WT_GEN_HAZARD, &hazard_gen);
- WT_IGNORE_RET(
- __wt_stash_add(session, WT_GEN_HAZARD, hazard_gen, ohazard, size * sizeof(WT_HAZARD)));
+ WT_IGNORE_RET(__wt_stash_add(session, WT_GEN_HAZARD, hazard_gen, ohazard, 0));
return (0);
}
@@ -237,7 +237,7 @@ __wt_hazard_close(WT_SESSION_IMPL *session)
break;
}
if (session->nhazard == 0 && !found)
- goto weak;
+ return;
__wt_errx(session, "session %p: close hazard pointer table: table not empty", (void *)session);
@@ -263,10 +263,6 @@ __wt_hazard_close(WT_SESSION_IMPL *session)
if (session->nhazard != 0)
__wt_errx(session, "session %p: close hazard pointer table: count didn't match entries",
(void *)session);
-
-weak:
- /* Same for weak hazard pointers. */
- __wt_hazard_weak_close(session);
}
/*
@@ -365,8 +361,7 @@ __wt_hazard_count(WT_SESSION_IMPL *session, WT_REF *ref)
uint32_t i, hazard_inuse;
u_int count;
- hp = session->hazard;
- hazard_inuse = session->hazard_inuse;
+ hazard_get_reference(session, &hp, &hazard_inuse);
for (count = 0, i = 0; i < hazard_inuse; ++hp, ++i)
if (hp->ref == ref)