Commit d12625f3 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Do not set the oa_present bit when ObjSetAttr returns failure

parent ef95a084
......@@ -180,7 +180,7 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, unsigned flags)
oc->timer_when, oc->flags);
if (oc->flags & OC_F_DYING) {
oc->exp_flags &= OC_EF_EXP;
oc->exp_flags &= ~OC_EF_EXP;
VSLb(&ep->vsl, SLT_ExpKill, "EXP_Kill p=%p e=%.9f f=0x%x", oc,
oc->timer_when, oc->flags);
if (!(flags & OC_EF_INSERT)) {
......
......@@ -414,14 +414,17 @@ ObjSetAttr(struct worker *wrk, struct objcore *oc, enum obj_attr attr,
ssize_t len, const void *ptr)
{
const struct obj_methods *om = obj_getmethods(oc);
void *r;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(oc->boc, BOC_MAGIC);
AN(om->objsetattr);
assert((int)attr < 16);
oc->oa_present |= (1 << attr);
return (om->objsetattr(wrk, oc, attr, len, ptr));
r = om->objsetattr(wrk, oc, attr, len, ptr);
if (r)
oc->oa_present |= (1 << attr);
return (r);
}
/*====================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment