Commit 9045b4b9 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd4: remove probe task's reference on client

Any null probe rpc will be synchronously destroyed by the
rpc_shutdown_client() in expire_client(), so the rpc task cannot outlast
the nfs4 client.  Therefore there's no need for that task to hold a
reference on the client.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 3df796db
...@@ -509,7 +509,6 @@ static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata) ...@@ -509,7 +509,6 @@ static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata)
warn_no_callback_path(clp, task->tk_status); warn_no_callback_path(clp, task->tk_status);
else else
atomic_set(&clp->cl_cb_conn.cb_set, 1); atomic_set(&clp->cl_cb_conn.cb_set, 1);
put_nfs4_client(clp);
} }
static const struct rpc_call_ops nfsd4_cb_probe_ops = { static const struct rpc_call_ops nfsd4_cb_probe_ops = {
...@@ -542,10 +541,8 @@ void do_probe_callback(struct nfs4_client *clp) ...@@ -542,10 +541,8 @@ void do_probe_callback(struct nfs4_client *clp)
status = rpc_call_async(cb->cb_client, &msg, status = rpc_call_async(cb->cb_client, &msg,
RPC_TASK_SOFT | RPC_TASK_SOFTCONN, RPC_TASK_SOFT | RPC_TASK_SOFTCONN,
&nfsd4_cb_probe_ops, (void *)clp); &nfsd4_cb_probe_ops, (void *)clp);
if (status) { if (status)
warn_no_callback_path(clp, status); warn_no_callback_path(clp, status);
put_nfs4_client(clp);
}
} }
/* /*
...@@ -563,10 +560,6 @@ nfsd4_probe_callback(struct nfs4_client *clp) ...@@ -563,10 +560,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
warn_no_callback_path(clp, status); warn_no_callback_path(clp, status);
return; return;
} }
/* the task holds a reference to the nfs4_client struct */
atomic_inc(&clp->cl_count);
do_probe_callback(clp); do_probe_callback(clp);
} }
......
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