VTAILQ_ENTRY(hcl_entry) list;
struct hcl_hd *head;
struct objhead *oh;
- unsigned refcnt;
unsigned digest;
unsigned hash;
};
continue;
if (i > 0)
break;
- he->refcnt++;
+ he->oh->refcnt++;
roh = he->oh;
Lck_Unlock(&hp->mtx);
/*
VTAILQ_INSERT_BEFORE(he, he2, list);
else
VTAILQ_INSERT_TAIL(&hp->head, he2, list);
- he2->refcnt++;
+ he2->oh->refcnt++;
noh = he2->oh;
Lck_Unlock(&hp->mtx);
return (noh);
CAST_OBJ_NOTNULL(he, oh->hashpriv, HCL_ENTRY_MAGIC);
hp = he->head;
CHECK_OBJ_NOTNULL(hp, HCL_HEAD_MAGIC);
- assert(he->refcnt > 0);
+ assert(he->oh->refcnt > 0);
assert(he->hash < hcl_nhash);
assert(hp == &hcl_head[he->hash]);
Lck_Lock(&hp->mtx);
- if (--he->refcnt == 0)
+ if (--he->oh->refcnt == 0)
VTAILQ_REMOVE(&hp->head, he, list);
else
he = NULL;
struct hsl_entry {
VTAILQ_ENTRY(hsl_entry) list;
struct objhead *oh;
- unsigned refcnt;
};
static VTAILQ_HEAD(, hsl_entry) hsl_head = VTAILQ_HEAD_INITIALIZER(hsl_head);
continue;
if (i > 0)
break;
- he->refcnt++;
+ he->oh->refcnt++;
noh = he->oh;
Lck_Unlock(&hsl_mtx);
return (noh);
he2 = calloc(sizeof *he2, 1);
XXXAN(he2);
he2->oh = noh;
- he2->refcnt = 1;
+ he2->oh->refcnt = 1;
noh->hashpriv = he2;
noh->hash = malloc(sp->lhashptr);
AN(oh->hashpriv);
he = oh->hashpriv;
Lck_Lock(&hsl_mtx);
- if (--he->refcnt == 0) {
+ if (--he->oh->refcnt == 0) {
VTAILQ_REMOVE(&hsl_head, he, list);
free(he);
ret = 0;