diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-04-16 16:43:06 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 15:09:30 -0400 |
commit | bb8b27e504c0f0463535fea31b42bcaa393c3fb0 (patch) | |
tree | fbf18d599a4a1bb5b509632ad9c906db288faeb3 /fs/nfs/nfs4state.c | |
parent | d7cf8dd01289b3c64057e38d34c2857f6633d52c (diff) | |
download | kernel_goldelico_gta04-bb8b27e504c0f0463535fea31b42bcaa393c3fb0.zip kernel_goldelico_gta04-bb8b27e504c0f0463535fea31b42bcaa393c3fb0.tar.gz kernel_goldelico_gta04-bb8b27e504c0f0463535fea31b42bcaa393c3fb0.tar.bz2 |
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/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 6c5ed51..cd2d904 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -62,6 +62,7 @@ static LIST_HEAD(nfs4_clientid_list); int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) { + struct nfs4_setclientid_res clid; unsigned short port; int status; @@ -69,11 +70,15 @@ int nfs4_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) if (clp->cl_addr.ss_family == AF_INET6) port = nfs_callback_tcpport6; - status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred); - if (status == 0) - status = nfs4_proc_setclientid_confirm(clp, cred); - if (status == 0) - nfs4_schedule_state_renewal(clp); + status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); + if (status != 0) + goto out; + status = nfs4_proc_setclientid_confirm(clp, &clid, cred); + if (status != 0) + goto out; + clp->cl_clientid = clid.clientid; + nfs4_schedule_state_renewal(clp); +out: return status; } |