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>
This commit is contained in:
parent
1e7af1b806
commit
07263f1efe
|
@ -472,7 +472,7 @@ static int max_cb_time(void)
|
||||||
/* Reference counting, callback cleanup, etc., all look racy as heck.
|
/* Reference counting, callback cleanup, etc., all look racy as heck.
|
||||||
* And why is cl_cb_set an atomic? */
|
* And why is cl_cb_set an atomic? */
|
||||||
|
|
||||||
int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb)
|
int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
|
||||||
{
|
{
|
||||||
struct rpc_timeout timeparms = {
|
struct rpc_timeout timeparms = {
|
||||||
.to_initval = max_cb_time(),
|
.to_initval = max_cb_time(),
|
||||||
|
@ -481,11 +481,11 @@ int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *cb)
|
||||||
struct rpc_create_args args = {
|
struct rpc_create_args args = {
|
||||||
.net = &init_net,
|
.net = &init_net,
|
||||||
.protocol = XPRT_TRANSPORT_TCP,
|
.protocol = XPRT_TRANSPORT_TCP,
|
||||||
.address = (struct sockaddr *) &cb->cb_addr,
|
.address = (struct sockaddr *) &conn->cb_addr,
|
||||||
.addrsize = cb->cb_addrlen,
|
.addrsize = conn->cb_addrlen,
|
||||||
.timeout = &timeparms,
|
.timeout = &timeparms,
|
||||||
.program = &cb_program,
|
.program = &cb_program,
|
||||||
.prognumber = cb->cb_prog,
|
.prognumber = conn->cb_prog,
|
||||||
.version = 0,
|
.version = 0,
|
||||||
.authflavor = clp->cl_flavor,
|
.authflavor = clp->cl_flavor,
|
||||||
.flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
|
.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)
|
||||||
|
|
||||||
if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
|
if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (cb->cb_minorversion) {
|
if (conn->cb_minorversion) {
|
||||||
args.bc_xprt = cb->cb_xprt;
|
args.bc_xprt = conn->cb_xprt;
|
||||||
args.protocol = XPRT_TRANSPORT_BC_TCP;
|
args.protocol = XPRT_TRANSPORT_BC_TCP;
|
||||||
}
|
}
|
||||||
/* Create RPC client */
|
/* Create RPC client */
|
||||||
|
@ -563,13 +563,13 @@ void do_probe_callback(struct nfs4_client *clp)
|
||||||
/*
|
/*
|
||||||
* Set up the callback client and put a NFSPROC4_CB_NULL on the wire...
|
* Set up the callback client and put a NFSPROC4_CB_NULL on the wire...
|
||||||
*/
|
*/
|
||||||
void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *cb)
|
void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
BUG_ON(atomic_read(&clp->cl_cb_set));
|
BUG_ON(atomic_read(&clp->cl_cb_set));
|
||||||
|
|
||||||
status = setup_callback_client(clp, cb);
|
status = setup_callback_client(clp, conn);
|
||||||
if (status) {
|
if (status) {
|
||||||
warn_no_callback_path(clp, status);
|
warn_no_callback_path(clp, status);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -207,7 +207,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
|
||||||
{
|
{
|
||||||
struct nfs4_delegation *dp;
|
struct nfs4_delegation *dp;
|
||||||
struct nfs4_file *fp = stp->st_file;
|
struct nfs4_file *fp = stp->st_file;
|
||||||
struct nfs4_cb_conn *cb = &stp->st_stateowner->so_client->cl_cb_conn;
|
struct nfs4_cb_conn *conn = &stp->st_stateowner->so_client->cl_cb_conn;
|
||||||
|
|
||||||
dprintk("NFSD alloc_init_deleg\n");
|
dprintk("NFSD alloc_init_deleg\n");
|
||||||
/*
|
/*
|
||||||
|
@ -234,7 +234,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
|
||||||
nfs4_file_get_access(fp, O_RDONLY);
|
nfs4_file_get_access(fp, O_RDONLY);
|
||||||
dp->dl_flock = NULL;
|
dp->dl_flock = NULL;
|
||||||
dp->dl_type = type;
|
dp->dl_type = type;
|
||||||
dp->dl_ident = cb->cb_ident;
|
dp->dl_ident = conn->cb_ident;
|
||||||
dp->dl_stateid.si_boot = boot_time;
|
dp->dl_stateid.si_boot = boot_time;
|
||||||
dp->dl_stateid.si_stateownerid = current_delegid++;
|
dp->dl_stateid.si_stateownerid = current_delegid++;
|
||||||
dp->dl_stateid.si_fileid = 0;
|
dp->dl_stateid.si_fileid = 0;
|
||||||
|
@ -1098,7 +1098,7 @@ find_unconfirmed_client_by_str(const char *dname, unsigned int hashval,
|
||||||
static void
|
static void
|
||||||
gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, u32 scopeid)
|
gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, u32 scopeid)
|
||||||
{
|
{
|
||||||
struct nfs4_cb_conn *cb = &clp->cl_cb_conn;
|
struct nfs4_cb_conn *conn = &clp->cl_cb_conn;
|
||||||
unsigned short expected_family;
|
unsigned short expected_family;
|
||||||
|
|
||||||
/* Currently, we only support tcp and tcp6 for the callback channel */
|
/* 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)
|
||||||
else
|
else
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
||||||
cb->cb_addrlen = rpc_uaddr2sockaddr(se->se_callback_addr_val,
|
conn->cb_addrlen = rpc_uaddr2sockaddr(se->se_callback_addr_val,
|
||||||
se->se_callback_addr_len,
|
se->se_callback_addr_len,
|
||||||
(struct sockaddr *) &cb->cb_addr,
|
(struct sockaddr *)&conn->cb_addr,
|
||||||
sizeof(cb->cb_addr));
|
sizeof(conn->cb_addr));
|
||||||
|
|
||||||
if (!cb->cb_addrlen || cb->cb_addr.ss_family != expected_family)
|
if (!conn->cb_addrlen || conn->cb_addr.ss_family != expected_family)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
||||||
if (cb->cb_addr.ss_family == AF_INET6)
|
if (conn->cb_addr.ss_family == AF_INET6)
|
||||||
((struct sockaddr_in6 *) &cb->cb_addr)->sin6_scope_id = scopeid;
|
((struct sockaddr_in6 *)&conn->cb_addr)->sin6_scope_id = scopeid;
|
||||||
|
|
||||||
cb->cb_minorversion = 0;
|
conn->cb_minorversion = 0;
|
||||||
cb->cb_prog = se->se_callback_prog;
|
conn->cb_prog = se->se_callback_prog;
|
||||||
cb->cb_ident = se->se_callback_ident;
|
conn->cb_ident = se->se_callback_ident;
|
||||||
return;
|
return;
|
||||||
out_err:
|
out_err:
|
||||||
cb->cb_addr.ss_family = AF_UNSPEC;
|
conn->cb_addr.ss_family = AF_UNSPEC;
|
||||||
cb->cb_addrlen = 0;
|
conn->cb_addrlen = 0;
|
||||||
dprintk(KERN_INFO "NFSD: this client (clientid %08x/%08x) "
|
dprintk(KERN_INFO "NFSD: this client (clientid %08x/%08x) "
|
||||||
"will not receive delegations\n",
|
"will not receive delegations\n",
|
||||||
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
|
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
|
||||||
|
|
Loading…
Reference in New Issue