Under memory pressure, the rpc memory allocation in bulk registration on the memory
release path also needs be covered.
Change-Id: Ie4986eb48d1e5b99b1756a0ddaa11fe0beb37462
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/439
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
connection = request->rq_import->imp_connection;
- if (request->rq_bulk != NULL) {
- rc = ptlrpc_register_bulk (request);
- if (rc != 0)
- RETURN(rc);
- }
-
lustre_msg_set_handle(request->rq_reqmsg,
&request->rq_import->imp_remote_handle);
lustre_msg_set_type(request->rq_reqmsg, PTL_RPC_MSG_REQUEST);
if (request->rq_memalloc)
mpflag = libcfs_memory_pressure_get_and_set();
+ if (request->rq_bulk != NULL) {
+ rc = ptlrpc_register_bulk (request);
+ if (rc != 0)
+ GOTO(out, rc);
+ }
+
if (!noreply) {
LASSERT (request->rq_replen != 0);
if (request->rq_repbuf == NULL)