Commit aeb673ca authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: Make sure svc_process releases response even on error.

If a rpc operation indicates that response should
be dropped (e.g. kmalloc failure) we must still
call pc_release to release anything it may have allocated.
parent 3a689637
...@@ -366,8 +366,12 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) ...@@ -366,8 +366,12 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp)
} }
} else { } else {
dprintk("svc: calling dispatcher\n"); dprintk("svc: calling dispatcher\n");
if (!versp->vs_dispatch(rqstp, statp)) if (!versp->vs_dispatch(rqstp, statp)) {
/* Release reply info */
if (procp->pc_release)
procp->pc_release(rqstp, NULL, rqstp->rq_resp);
goto dropit; goto dropit;
}
} }
/* Check RPC status result */ /* Check RPC status result */
......
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