Commit 023859ce authored by Thiago Rafael Becker's avatar Thiago Rafael Becker Committed by Trond Myklebust

sunrpc: remove unnecessary test in rpc_task_set_client()

In rpc_task_set_client(), testing for a NULL clnt is not necessary, as
clnt should always be a valid pointer to a rpc_client.
Signed-off-by: default avatarThiago Rafael Becker <trbecker@gmail.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 5fe1210d
......@@ -1076,8 +1076,6 @@ void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt)
static
void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt)
{
if (clnt != NULL) {
rpc_task_set_transport(task, clnt);
task->tk_client = clnt;
refcount_inc(&clnt->cl_count);
......@@ -1093,7 +1091,6 @@ void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt)
spin_lock(&clnt->cl_lock);
list_add_tail(&task->tk_task, &clnt->cl_tasks);
spin_unlock(&clnt->cl_lock);
}
}
static void
......
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