aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-02-21 20:53:04 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-04-02 17:04:32 -0400
commit9045b4b9f7f340f43de0cf687b5b52f6feaaa984 (patch)
tree5f955b3544bb8051723646090c2f2ecc91b07225 /fs
parent3df796dbe97a98a6a25e6b7b88e9d326e261f371 (diff)
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: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4callback.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index b99c3f0f1d35..91eb2ea9ef0a 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -509,7 +509,6 @@ static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata)
509 warn_no_callback_path(clp, task->tk_status); 509 warn_no_callback_path(clp, task->tk_status);
510 else 510 else
511 atomic_set(&clp->cl_cb_conn.cb_set, 1); 511 atomic_set(&clp->cl_cb_conn.cb_set, 1);
512 put_nfs4_client(clp);
513} 512}
514 513
515static const struct rpc_call_ops nfsd4_cb_probe_ops = { 514static const struct rpc_call_ops nfsd4_cb_probe_ops = {
@@ -542,10 +541,8 @@ void do_probe_callback(struct nfs4_client *clp)
542 status = rpc_call_async(cb->cb_client, &msg, 541 status = rpc_call_async(cb->cb_client, &msg,
543 RPC_TASK_SOFT | RPC_TASK_SOFTCONN, 542 RPC_TASK_SOFT | RPC_TASK_SOFTCONN,
544 &nfsd4_cb_probe_ops, (void *)clp); 543 &nfsd4_cb_probe_ops, (void *)clp);
545 if (status) { 544 if (status)
546 warn_no_callback_path(clp, status); 545 warn_no_callback_path(clp, status);
547 put_nfs4_client(clp);
548 }
549} 546}
550 547
551/* 548/*
@@ -563,10 +560,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
563 warn_no_callback_path(clp, status); 560 warn_no_callback_path(clp, status);
564 return; 561 return;
565 } 562 }
566
567 /* the task holds a reference to the nfs4_client struct */
568 atomic_inc(&clp->cl_count);
569
570 do_probe_callback(clp); 563 do_probe_callback(clp);
571} 564}
572 565