diff --git a/src/object/srv_obj.c b/src/object/srv_obj.c index a0cebabc9f8..82be246bb8f 100644 --- a/src/object/srv_obj.c +++ b/src/object/srv_obj.c @@ -2256,6 +2256,9 @@ obj_ioc_fini(struct obj_io_context *ioc, int err) } } +static void +obj_ioc_end(struct obj_io_context *ioc, int err); + /* Setup lite IO context, it is only for compound RPC so far: * - no associated object yet * - no permission check (not sure it's read/write) @@ -2359,6 +2362,10 @@ obj_ioc_begin_lite(uint32_t rpc_map_ver, uuid_t pool_uuid, d_tm_inc_gauge(tls->ot_op_active[opc_get(rpc->cr_opc)], 1); ioc->ioc_start_time = daos_get_ntime(); ioc->ioc_began = 1; + + if (rc != 0) + obj_ioc_end(ioc, rc); + return rc; }