* [PATCH] SUNRPC: Fix the return value of rpc_run_bc_task()
@ 2010-03-19 20:16 Trond Myklebust
0 siblings, 0 replies; only message in thread
From: Trond Myklebust @ 2010-03-19 20:16 UTC (permalink / raw)
To: linux-nfs; +Cc: Ricardo Labiaga, Benny Halevy
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Currently rpc_run_bc_task() will return NULL if the task allocation failed.
However the only caller is bc_send, which assumes that the return value
will be an ERR_PTR.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
net/sunrpc/clnt.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 154034b..19c9983 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -659,6 +659,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req,
task = rpc_new_task(&task_setup_data);
if (!task) {
xprt_free_bc_request(req);
+ task = ERR_PTR(-ENOMEM);
goto out;
}
task->tk_rqstp = req;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-19 20:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-19 20:16 [PATCH] SUNRPC: Fix the return value of rpc_run_bc_task() Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox