From 92d662fa5e6c281b64bc1aba5e0ca5d5839949ee Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 23 Dec 2013 23:21:01 -0500 Subject: [PATCH] ck_hs: Simplification of probe sequence limit. --- src/ck_hs.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/ck_hs.c b/src/ck_hs.c index 4283e30..6347dc1 100644 --- a/src/ck_hs.c +++ b/src/ck_hs.c @@ -421,19 +421,16 @@ ck_hs_map_probe(struct ck_hs *hs, cursor = bucket + ((j + offset) & (CK_HS_PROBE_L1 - 1)); if (probes++ == probe_limit) { - if (probe_limit != opl && pr == NULL) { - /* - * If no eligible slot has been found yet, continue probe - * sequence with original probe limit. - */ - probe_limit = opl; - probes--; - j--; - continue; + if (probe_limit == opl || pr != NULL) { + k = CK_HS_EMPTY; + goto leave; } - k = CK_HS_EMPTY; - goto leave; + /* + * If no eligible slot has been found yet, continue probe + * sequence with original probe limit. + */ + probe_limit = opl; } k = ck_pr_load_ptr(cursor);