aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-08-22 20:06:14 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:38 -0400
commit9c5bf38d85a31b946664bcc21078ef5bb10672f7 (patch)
treecceee456ebefe2380a417746b366d67a11ec6ebe
parent36b15c54cd0d6f707a3ac03e4a2a60bb530a95b9 (diff)
NFS: Fix nfs_alloc_client()
The scheme to indicate which services have been started up appears to be seriously broken. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/client.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 700bd5801223..471d975e63c3 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -113,9 +113,9 @@ static struct nfs_client *nfs_alloc_client(const char *hostname,
113 if (error < 0) { 113 if (error < 0) {
114 dprintk("%s: couldn't start rpciod! Error = %d\n", 114 dprintk("%s: couldn't start rpciod! Error = %d\n",
115 __FUNCTION__, error); 115 __FUNCTION__, error);
116 __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
117 goto error_1; 116 goto error_1;
118 } 117 }
118 __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
119 119
120 if (nfsversion == 4) { 120 if (nfsversion == 4) {
121 if (nfs_callback_up() < 0) 121 if (nfs_callback_up() < 0)
@@ -153,8 +153,8 @@ static struct nfs_client *nfs_alloc_client(const char *hostname,
153 return clp; 153 return clp;
154 154
155error_3: 155error_3:
156 nfs_callback_down(); 156 if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state))
157 __clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state); 157 nfs_callback_down();
158error_2: 158error_2:
159 rpciod_down(); 159 rpciod_down();
160 __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state); 160 __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
@@ -195,7 +195,7 @@ static void nfs_free_client(struct nfs_client *clp)
195 nfs_callback_down(); 195 nfs_callback_down();
196 196
197 if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state)) 197 if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state))
198 rpciod_down(); 198 rpciod_down();
199 199
200 kfree(clp->cl_hostname); 200 kfree(clp->cl_hostname);
201 kfree(clp); 201 kfree(clp);
@@ -881,9 +881,9 @@ static int nfs4_init_client(struct nfs_client *clp,
881 if (error < 0) { 881 if (error < 0) {
882 dprintk("%s: failed to create idmapper. Error = %d\n", 882 dprintk("%s: failed to create idmapper. Error = %d\n",
883 __FUNCTION__, error); 883 __FUNCTION__, error);
884 __set_bit(NFS_CS_IDMAP, &clp->cl_res_state);
885 goto error; 884 goto error;
886 } 885 }
886 __set_bit(NFS_CS_IDMAP, &clp->cl_res_state);
887 887
888 nfs_mark_client_ready(clp, NFS_CS_READY); 888 nfs_mark_client_ready(clp, NFS_CS_READY);
889 return 0; 889 return 0;