fellow_cache: Generalize fcr handler

parent 481980bf
......@@ -499,14 +499,13 @@ stvfe_dskoc_fco(struct worker *wrk,
* error handling
*/
/* handle fellow_cache_res for iterators */
static int
stvfe_fcr_handle_iter(struct worker *wrk, struct objcore *oc,
static void
stvfe_fcr_handle(struct worker *wrk, struct objcore *oc,
const struct stevedore *stv, const struct stvfe *stvfe,
struct fellow_cache_res fcr)
{
if (fcr.status == fcr_ok)
return (fcr.r.integer);
return;
stvfe->stats->c_mem_obj_fail++;
......@@ -517,6 +516,19 @@ stvfe_fcr_handle_iter(struct worker *wrk, struct objcore *oc,
HSH_Fail(oc);
if (!(/*lint --e(641)*/ oc->flags & OC_F_BUSY))
HSH_Kill(oc);
}
/* handle fellow_cache_res for iterators */
static int
stvfe_fcr_handle_iter(struct worker *wrk, struct objcore *oc,
const struct stevedore *stv, const struct stvfe *stvfe,
struct fellow_cache_res fcr)
{
if (fcr.status == fcr_ok)
return (fcr.r.integer);
stvfe_fcr_handle(wrk, oc, stv, stvfe, fcr);
return (-1);
}
......
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