aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-04-16 16:43:06 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-05-14 15:09:30 -0400
commitbb8b27e504c0f0463535fea31b42bcaa393c3fb0 (patch)
treefbf18d599a4a1bb5b509632ad9c906db288faeb3 /fs/nfs/nfs4proc.c
parentd7cf8dd01289b3c64057e38d34c2857f6633d52c (diff)
NFSv4: Clean up the NFSv4 setclientid operation
Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 45f64701d4a6..04f4b2b2506b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3511,7 +3511,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
3511 return _nfs4_async_handle_error(task, server, server->nfs_client, state); 3511 return _nfs4_async_handle_error(task, server, server->nfs_client, state);
3512} 3512}
3513 3513
3514int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) 3514int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
3515 unsigned short port, struct rpc_cred *cred,
3516 struct nfs4_setclientid_res *res)
3515{ 3517{
3516 nfs4_verifier sc_verifier; 3518 nfs4_verifier sc_verifier;
3517 struct nfs4_setclientid setclientid = { 3519 struct nfs4_setclientid setclientid = {
@@ -3521,7 +3523,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po
3521 struct rpc_message msg = { 3523 struct rpc_message msg = {
3522 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID], 3524 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID],
3523 .rpc_argp = &setclientid, 3525 .rpc_argp = &setclientid,
3524 .rpc_resp = clp, 3526 .rpc_resp = res,
3525 .rpc_cred = cred, 3527 .rpc_cred = cred,
3526 }; 3528 };
3527 __be32 *p; 3529 __be32 *p;
@@ -3564,12 +3566,14 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po
3564 return status; 3566 return status;
3565} 3567}
3566 3568
3567static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) 3569static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp,
3570 struct nfs4_setclientid_res *arg,
3571 struct rpc_cred *cred)
3568{ 3572{
3569 struct nfs_fsinfo fsinfo; 3573 struct nfs_fsinfo fsinfo;
3570 struct rpc_message msg = { 3574 struct rpc_message msg = {
3571 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID_CONFIRM], 3575 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID_CONFIRM],
3572 .rpc_argp = clp, 3576 .rpc_argp = arg,
3573 .rpc_resp = &fsinfo, 3577 .rpc_resp = &fsinfo,
3574 .rpc_cred = cred, 3578 .rpc_cred = cred,
3575 }; 3579 };
@@ -3587,12 +3591,14 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cre
3587 return status; 3591 return status;
3588} 3592}
3589 3593
3590int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) 3594int nfs4_proc_setclientid_confirm(struct nfs_client *clp,
3595 struct nfs4_setclientid_res *arg,
3596 struct rpc_cred *cred)
3591{ 3597{
3592 long timeout = 0; 3598 long timeout = 0;
3593 int err; 3599 int err;
3594 do { 3600 do {
3595 err = _nfs4_proc_setclientid_confirm(clp, cred); 3601 err = _nfs4_proc_setclientid_confirm(clp, arg, cred);
3596 switch (err) { 3602 switch (err) {
3597 case 0: 3603 case 0:
3598 return err; 3604 return err;