aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4callback.c16
-rw-r--r--fs/nfsd/nfs4state.c22
-rw-r--r--include/linux/nfsd/state.h4
3 files changed, 21 insertions, 21 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 0aaf68beedbd..ed860d7ddd19 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -369,7 +369,7 @@ static int max_cb_time(void)
369int setup_callback_client(struct nfs4_client *clp) 369int setup_callback_client(struct nfs4_client *clp)
370{ 370{
371 struct sockaddr_in addr; 371 struct sockaddr_in addr;
372 struct nfs4_callback *cb = &clp->cl_callback; 372 struct nfs4_cb_conn *cb = &clp->cl_cb_conn;
373 struct rpc_timeout timeparms = { 373 struct rpc_timeout timeparms = {
374 .to_initval = max_cb_time(), 374 .to_initval = max_cb_time(),
375 .to_retries = 0, 375 .to_retries = 0,
@@ -422,7 +422,7 @@ static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata)
422 if (task->tk_status) 422 if (task->tk_status)
423 warn_no_callback_path(clp, task->tk_status); 423 warn_no_callback_path(clp, task->tk_status);
424 else 424 else
425 atomic_set(&clp->cl_callback.cb_set, 1); 425 atomic_set(&clp->cl_cb_conn.cb_set, 1);
426 put_nfs4_client(clp); 426 put_nfs4_client(clp);
427} 427}
428 428
@@ -430,7 +430,7 @@ static const struct rpc_call_ops nfsd4_cb_probe_ops = {
430 .rpc_call_done = nfsd4_cb_probe_done, 430 .rpc_call_done = nfsd4_cb_probe_done,
431}; 431};
432 432
433static struct rpc_cred *lookup_cb_cred(struct nfs4_callback *cb) 433static struct rpc_cred *lookup_cb_cred(struct nfs4_cb_conn *cb)
434{ 434{
435 struct auth_cred acred = { 435 struct auth_cred acred = {
436 .machine_cred = 1 436 .machine_cred = 1
@@ -448,7 +448,7 @@ static struct rpc_cred *lookup_cb_cred(struct nfs4_callback *cb)
448 448
449void do_probe_callback(struct nfs4_client *clp) 449void do_probe_callback(struct nfs4_client *clp)
450{ 450{
451 struct nfs4_callback *cb = &clp->cl_callback; 451 struct nfs4_cb_conn *cb = &clp->cl_cb_conn;
452 struct rpc_message msg = { 452 struct rpc_message msg = {
453 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], 453 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
454 .rpc_argp = clp, 454 .rpc_argp = clp,
@@ -480,7 +480,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
480{ 480{
481 int status; 481 int status;
482 482
483 BUG_ON(atomic_read(&clp->cl_callback.cb_set)); 483 BUG_ON(atomic_read(&clp->cl_cb_conn.cb_set));
484 484
485 status = setup_callback_client(clp); 485 status = setup_callback_client(clp);
486 if (status) { 486 if (status) {
@@ -501,12 +501,12 @@ void
501nfsd4_cb_recall(struct nfs4_delegation *dp) 501nfsd4_cb_recall(struct nfs4_delegation *dp)
502{ 502{
503 struct nfs4_client *clp = dp->dl_client; 503 struct nfs4_client *clp = dp->dl_client;
504 struct rpc_clnt *clnt = clp->cl_callback.cb_client; 504 struct rpc_clnt *clnt = clp->cl_cb_conn.cb_client;
505 struct nfs4_cb_recall *cbr = &dp->dl_recall; 505 struct nfs4_cb_recall *cbr = &dp->dl_recall;
506 struct rpc_message msg = { 506 struct rpc_message msg = {
507 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_RECALL], 507 .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_RECALL],
508 .rpc_argp = cbr, 508 .rpc_argp = cbr,
509 .rpc_cred = clp->cl_callback.cb_cred 509 .rpc_cred = clp->cl_cb_conn.cb_cred
510 }; 510 };
511 int retries = 1; 511 int retries = 1;
512 int status = 0; 512 int status = 0;
@@ -519,7 +519,7 @@ nfsd4_cb_recall(struct nfs4_delegation *dp)
519 switch (status) { 519 switch (status) {
520 case -EIO: 520 case -EIO:
521 /* Network partition? */ 521 /* Network partition? */
522 atomic_set(&clp->cl_callback.cb_set, 0); 522 atomic_set(&clp->cl_cb_conn.cb_set, 0);
523 case -EBADHANDLE: 523 case -EBADHANDLE:
524 case -NFS4ERR_BAD_STATEID: 524 case -NFS4ERR_BAD_STATEID:
525 /* Race: client probably got cb_recall 525 /* Race: client probably got cb_recall
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index b205c7d7bc6a..d7b5e6b89207 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -182,7 +182,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
182{ 182{
183 struct nfs4_delegation *dp; 183 struct nfs4_delegation *dp;
184 struct nfs4_file *fp = stp->st_file; 184 struct nfs4_file *fp = stp->st_file;
185 struct nfs4_callback *cb = &stp->st_stateowner->so_client->cl_callback; 185 struct nfs4_cb_conn *cb = &stp->st_stateowner->so_client->cl_cb_conn;
186 186
187 dprintk("NFSD alloc_init_deleg\n"); 187 dprintk("NFSD alloc_init_deleg\n");
188 if (fp->fi_had_conflict) 188 if (fp->fi_had_conflict)
@@ -633,19 +633,19 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name)
633static void 633static void
634shutdown_callback_client(struct nfs4_client *clp) 634shutdown_callback_client(struct nfs4_client *clp)
635{ 635{
636 struct rpc_clnt *clnt = clp->cl_callback.cb_client; 636 struct rpc_clnt *clnt = clp->cl_cb_conn.cb_client;
637 637
638 if (clnt) { 638 if (clnt) {
639 /* 639 /*
640 * Callback threads take a reference on the client, so there 640 * Callback threads take a reference on the client, so there
641 * should be no outstanding callbacks at this point. 641 * should be no outstanding callbacks at this point.
642 */ 642 */
643 clp->cl_callback.cb_client = NULL; 643 clp->cl_cb_conn.cb_client = NULL;
644 rpc_shutdown_client(clnt); 644 rpc_shutdown_client(clnt);
645 } 645 }
646 if (clp->cl_callback.cb_cred) { 646 if (clp->cl_cb_conn.cb_cred) {
647 put_rpccred(clp->cl_callback.cb_cred); 647 put_rpccred(clp->cl_cb_conn.cb_cred);
648 clp->cl_callback.cb_cred = NULL; 648 clp->cl_cb_conn.cb_cred = NULL;
649 } 649 }
650} 650}
651 651
@@ -719,7 +719,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir)
719 return NULL; 719 return NULL;
720 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN); 720 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN);
721 atomic_set(&clp->cl_count, 1); 721 atomic_set(&clp->cl_count, 1);
722 atomic_set(&clp->cl_callback.cb_set, 0); 722 atomic_set(&clp->cl_cb_conn.cb_set, 0);
723 INIT_LIST_HEAD(&clp->cl_idhash); 723 INIT_LIST_HEAD(&clp->cl_idhash);
724 INIT_LIST_HEAD(&clp->cl_strhash); 724 INIT_LIST_HEAD(&clp->cl_strhash);
725 INIT_LIST_HEAD(&clp->cl_openowners); 725 INIT_LIST_HEAD(&clp->cl_openowners);
@@ -971,7 +971,7 @@ parse_ipv4(unsigned int addr_len, char *addr_val, unsigned int *cbaddrp, unsigne
971static void 971static void
972gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se) 972gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se)
973{ 973{
974 struct nfs4_callback *cb = &clp->cl_callback; 974 struct nfs4_cb_conn *cb = &clp->cl_cb_conn;
975 975
976 /* Currently, we only support tcp for the callback channel */ 976 /* Currently, we only support tcp for the callback channel */
977 if ((se->se_callback_netid_len != 3) || memcmp((char *)se->se_callback_netid_val, "tcp", 3)) 977 if ((se->se_callback_netid_len != 3) || memcmp((char *)se->se_callback_netid_val, "tcp", 3))
@@ -1691,7 +1691,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
1691 else { 1691 else {
1692 /* XXX: We just turn off callbacks until we can handle 1692 /* XXX: We just turn off callbacks until we can handle
1693 * change request correctly. */ 1693 * change request correctly. */
1694 atomic_set(&conf->cl_callback.cb_set, 0); 1694 atomic_set(&conf->cl_cb_conn.cb_set, 0);
1695 expire_client(unconf); 1695 expire_client(unconf);
1696 status = nfs_ok; 1696 status = nfs_ok;
1697 1697
@@ -2425,7 +2425,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2425{ 2425{
2426 struct nfs4_delegation *dp; 2426 struct nfs4_delegation *dp;
2427 struct nfs4_stateowner *sop = stp->st_stateowner; 2427 struct nfs4_stateowner *sop = stp->st_stateowner;
2428 struct nfs4_callback *cb = &sop->so_client->cl_callback; 2428 struct nfs4_cb_conn *cb = &sop->so_client->cl_cb_conn;
2429 struct file_lock fl, *flp = &fl; 2429 struct file_lock fl, *flp = &fl;
2430 int status, flag = 0; 2430 int status, flag = 0;
2431 2431
@@ -2617,7 +2617,7 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
2617 renew_client(clp); 2617 renew_client(clp);
2618 status = nfserr_cb_path_down; 2618 status = nfserr_cb_path_down;
2619 if (!list_empty(&clp->cl_delegations) 2619 if (!list_empty(&clp->cl_delegations)
2620 && !atomic_read(&clp->cl_callback.cb_set)) 2620 && !atomic_read(&clp->cl_cb_conn.cb_set))
2621 goto out; 2621 goto out;
2622 status = nfs_ok; 2622 status = nfs_ok;
2623out: 2623out:
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index 8d882a3eb4b9..563c367a3013 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -88,7 +88,7 @@ struct nfs4_delegation {
88#define dl_fh dl_recall.cbr_fh 88#define dl_fh dl_recall.cbr_fh
89 89
90/* client delegation callback info */ 90/* client delegation callback info */
91struct nfs4_callback { 91struct nfs4_cb_conn {
92 /* SETCLIENTID info */ 92 /* SETCLIENTID info */
93 u32 cb_addr; 93 u32 cb_addr;
94 unsigned short cb_port; 94 unsigned short cb_port;
@@ -186,7 +186,7 @@ struct nfs4_client {
186 struct svc_cred cl_cred; /* setclientid principal */ 186 struct svc_cred cl_cred; /* setclientid principal */
187 clientid_t cl_clientid; /* generated by server */ 187 clientid_t cl_clientid; /* generated by server */
188 nfs4_verifier cl_confirm; /* generated by server */ 188 nfs4_verifier cl_confirm; /* generated by server */
189 struct nfs4_callback cl_callback; /* callback info */ 189 struct nfs4_cb_conn cl_cb_conn; /* callback info */
190 atomic_t cl_count; /* ref count */ 190 atomic_t cl_count; /* ref count */
191 u32 cl_firststate; /* recovery dir creation */ 191 u32 cl_firststate; /* recovery dir creation */
192 192