&oinfo, NULL,
osc_async_upcall,
cbargs, PTLRPCD_SET);
+ cbargs->opc_rpc_sent = result == 0;
}
return result;
}
struct osc_io *oio = cl2osc_io(env, slice);
struct cl_object *obj = slice->cis_obj;
struct osc_async_cbargs *cbargs = &oio->oi_cbarg;
- int result;
-
- cfs_wait_for_completion(&cbargs->opc_sync);
+ int result = 0;
- result = io->ci_result = cbargs->opc_rc;
+ if (cbargs->opc_rpc_sent) {
+ cfs_wait_for_completion(&cbargs->opc_sync);
+ result = io->ci_result = cbargs->opc_rc;
+ }
if (result == 0) {
if (oio->oi_lockless) {
/* lockless truncate */