aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2005-06-22 13:16:23 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:16 -0400
commit6a19275ada9137435da58990c8f8d3f58e170bf1 (patch)
tree927f8aa96c9b558a0bed5355dde66df9c0ec8554 /fs/nfs/nfs4state.c
parent438b6fdebf2a2e8573e7290bc176feb4d4475f43 (diff)
[PATCH] RPC: [PATCH] improve rpcauthauth_create error returns
Currently we return -ENOMEM for every single failure to create a new auth. This is actually accurate for auth_null and auth_unix, but for auth_gss it's a bit confusing. Allow rpcauth_create (and the ->create methods) to return errors. With this patch, the user may sometimes see an EINVAL instead. Whee. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 17b187f2d776..591ad1d51880 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -110,6 +110,7 @@ nfs4_alloc_client(struct in_addr *addr)
110 INIT_LIST_HEAD(&clp->cl_superblocks); 110 INIT_LIST_HEAD(&clp->cl_superblocks);
111 init_waitqueue_head(&clp->cl_waitq); 111 init_waitqueue_head(&clp->cl_waitq);
112 rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS4 client"); 112 rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS4 client");
113 clp->cl_rpcclient = ERR_PTR(-EINVAL);
113 clp->cl_boot_time = CURRENT_TIME; 114 clp->cl_boot_time = CURRENT_TIME;
114 clp->cl_state = 1 << NFS4CLNT_OK; 115 clp->cl_state = 1 << NFS4CLNT_OK;
115 return clp; 116 return clp;
@@ -131,7 +132,7 @@ nfs4_free_client(struct nfs4_client *clp)
131 if (clp->cl_cred) 132 if (clp->cl_cred)
132 put_rpccred(clp->cl_cred); 133 put_rpccred(clp->cl_cred);
133 nfs_idmap_delete(clp); 134 nfs_idmap_delete(clp);
134 if (clp->cl_rpcclient) 135 if (!IS_ERR(clp->cl_rpcclient))
135 rpc_shutdown_client(clp->cl_rpcclient); 136 rpc_shutdown_client(clp->cl_rpcclient);
136 kfree(clp); 137 kfree(clp);
137 nfs_callback_down(); 138 nfs_callback_down();