aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-05-31 19:09:40 -0400
committerJ. Bruce Fields <bfields@redhat.com>2010-10-01 19:29:43 -0400
commit07263f1efe7d5b96e6713471abfa087f41bb2b7c (patch)
treebb5fb62ff610cd9f4cf6abe50baa4a6c2a9a5194 /fs
parent1e7af1b8062598a038c04dfaaabd038a0d6e8b6a (diff)
nfsd4: minor variable renaming (cb -> conn)
Now that we have both nfsd4_callback and nfsd4_cb_conn structures, I get confused if variables of both types are always named cb.... Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4callback.c16
-rw-r--r--fs/nfsd/nfs4state.c28
2 files changed, 22 insertions, 22 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 1112f451295a..4566b69128a3 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -472,7 +472,7 @@ static int max_cb_time(void)
472/* Reference counting, callback cleanup, etc., all look racy as heck. 472/* Reference counting, callback cleanup, etc., all look racy as heck.
473 * And why is cl_cb_set an atomic? */ 473 * And why is cl_cb_set an atomic? */
474 474
475int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb) 475int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
476{ 476{
477 struct rpc_timeout timeparms = { 477 struct rpc_timeout timeparms = {
478 .to_initval = max_cb_time(), 478 .to_initval = max_cb_time(),
@@ -481,11 +481,11 @@ int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb)
481 struct rpc_create_args args = { 481 struct rpc_create_args args = {
482 .net = &init_net, 482 .net = &init_net,
483 .protocol = XPRT_TRANSPORT_TCP, 483 .protocol = XPRT_TRANSPORT_TCP,
484 .address = (struct sockaddr *) &cb->cb_addr, 484 .address = (struct sockaddr *) &conn->cb_addr,
485 .addrsize = cb->cb_addrlen, 485 .addrsize = conn->cb_addrlen,
486 .timeout = &timeparms, 486 .timeout = &timeparms,
487 .program = &cb_program, 487 .program = &cb_program,
488 .prognumber = cb->cb_prog, 488 .prognumber = conn->cb_prog,
489 .version = 0, 489 .version = 0,
490 .authflavor = clp->cl_flavor, 490 .authflavor = clp->cl_flavor,
491 .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), 491 .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
@@ -495,8 +495,8 @@ int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb)
495 495
496 if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) 496 if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
497 return -EINVAL; 497 return -EINVAL;
498 if (cb->cb_minorversion) { 498 if (conn->cb_minorversion) {
499 args.bc_xprt = cb->cb_xprt; 499 args.bc_xprt = conn->cb_xprt;
500 args.protocol = XPRT_TRANSPORT_BC_TCP; 500 args.protocol = XPRT_TRANSPORT_BC_TCP;
501 } 501 }
502 /* Create RPC client */ 502 /* Create RPC client */
@@ -563,13 +563,13 @@ void do_probe_callback(struct nfs4_client *clp)
563/* 563/*
564 * Set up the callback client and put a NFSPROC4_CB_NULL on the wire... 564 * Set up the callback client and put a NFSPROC4_CB_NULL on the wire...
565 */ 565 */
566void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *cb) 566void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
567{ 567{
568 int status; 568 int status;
569 569
570 BUG_ON(atomic_read(&clp->cl_cb_set)); 570 BUG_ON(atomic_read(&clp->cl_cb_set));
571 571
572 status = setup_callback_client(clp, cb); 572 status = setup_callback_client(clp, conn);
573 if (status) { 573 if (status) {
574 warn_no_callback_path(clp, status); 574 warn_no_callback_path(clp, status);
575 return; 575 return;
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cf0d2ffb3c84..d347180ce55a 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -207,7 +207,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
207{ 207{
208 struct nfs4_delegation *dp; 208 struct nfs4_delegation *dp;
209 struct nfs4_file *fp = stp->st_file; 209 struct nfs4_file *fp = stp->st_file;
210 struct nfs4_cb_conn *cb = &stp->st_stateowner->so_client->cl_cb_conn; 210 struct nfs4_cb_conn *conn = &stp->st_stateowner->so_client->cl_cb_conn;
211 211
212 dprintk("NFSD alloc_init_deleg\n"); 212 dprintk("NFSD alloc_init_deleg\n");
213 /* 213 /*
@@ -234,7 +234,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
234 nfs4_file_get_access(fp, O_RDONLY); 234 nfs4_file_get_access(fp, O_RDONLY);
235 dp->dl_flock = NULL; 235 dp->dl_flock = NULL;
236 dp->dl_type = type; 236 dp->dl_type = type;
237 dp->dl_ident = cb->cb_ident; 237 dp->dl_ident = conn->cb_ident;
238 dp->dl_stateid.si_boot = boot_time; 238 dp->dl_stateid.si_boot = boot_time;
239 dp->dl_stateid.si_stateownerid = current_delegid++; 239 dp->dl_stateid.si_stateownerid = current_delegid++;
240 dp->dl_stateid.si_fileid = 0; 240 dp->dl_stateid.si_fileid = 0;
@@ -1098,7 +1098,7 @@ find_unconfirmed_client_by_str(const char *dname, unsigned int hashval,
1098static void 1098static void
1099gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, u32 scopeid) 1099gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, u32 scopeid)
1100{ 1100{
1101 struct nfs4_cb_conn *cb = &clp->cl_cb_conn; 1101 struct nfs4_cb_conn *conn = &clp->cl_cb_conn;
1102 unsigned short expected_family; 1102 unsigned short expected_family;
1103 1103
1104 /* Currently, we only support tcp and tcp6 for the callback channel */ 1104 /* Currently, we only support tcp and tcp6 for the callback channel */
@@ -1111,24 +1111,24 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, u32 scopeid)
1111 else 1111 else
1112 goto out_err; 1112 goto out_err;
1113 1113
1114 cb->cb_addrlen = rpc_uaddr2sockaddr(se->se_callback_addr_val, 1114 conn->cb_addrlen = rpc_uaddr2sockaddr(se->se_callback_addr_val,
1115 se->se_callback_addr_len, 1115 se->se_callback_addr_len,
1116 (struct sockaddr *) &cb->cb_addr, 1116 (struct sockaddr *)&conn->cb_addr,
1117 sizeof(cb->cb_addr)); 1117 sizeof(conn->cb_addr));
1118 1118
1119 if (!cb->cb_addrlen || cb->cb_addr.ss_family != expected_family) 1119 if (!conn->cb_addrlen || conn->cb_addr.ss_family != expected_family)
1120 goto out_err; 1120 goto out_err;
1121 1121
1122 if (cb->cb_addr.ss_family == AF_INET6) 1122 if (conn->cb_addr.ss_family == AF_INET6)
1123 ((struct sockaddr_in6 *) &cb->cb_addr)->sin6_scope_id = scopeid; 1123 ((struct sockaddr_in6 *)&conn->cb_addr)->sin6_scope_id = scopeid;
1124 1124
1125 cb->cb_minorversion = 0; 1125 conn->cb_minorversion = 0;
1126 cb->cb_prog = se->se_callback_prog; 1126 conn->cb_prog = se->se_callback_prog;
1127 cb->cb_ident = se->se_callback_ident; 1127 conn->cb_ident = se->se_callback_ident;
1128 return; 1128 return;
1129out_err: 1129out_err:
1130 cb->cb_addr.ss_family = AF_UNSPEC; 1130 conn->cb_addr.ss_family = AF_UNSPEC;
1131 cb->cb_addrlen = 0; 1131 conn->cb_addrlen = 0;
1132 dprintk(KERN_INFO "NFSD: this client (clientid %08x/%08x) " 1132 dprintk(KERN_INFO "NFSD: this client (clientid %08x/%08x) "
1133 "will not receive delegations\n", 1133 "will not receive delegations\n",
1134 clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); 1134 clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);