desc = ptlrpc_prep_bulk_exp(req, npages,
BULK_PUT_SOURCE, OST_BULK_PORTAL);
if (desc == NULL)
- GOTO(out_lock, rc = -ENOMEM);
+ GOTO(out_commitrw, rc = -ENOMEM);
if (!lustre_handle_is_used(&lockh))
/* no needs to try to prolong lock if server is asked
no_reply = rc != 0;
}
+out_commitrw:
/* Must commit after prep above in all cases */
rc = obd_commitrw(OBD_BRW_READ, exp, &body->oa, 1, ioo,
remote_nb, npages, local_nb, oti, rc);
desc = ptlrpc_prep_bulk_exp(req, npages,
BULK_GET_SINK, OST_BULK_PORTAL);
if (desc == NULL)
- GOTO(out_lock, rc = -ENOMEM);
+ GOTO(skip_transfer, rc = -ENOMEM);
/* NB Having prepped, we must commit... */
}
no_reply = rc != 0;
+skip_transfer:
repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
memcpy(&repbody->oa, &body->oa, sizeof(repbody->oa));