diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 21:13:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-18 21:13:44 -0400 |
commit | 1f84603c0940d5bed17f7e4d2e0b2a4b8b8f1b81 (patch) | |
tree | 143956f878290e85de7c9130f465e862f587ee53 /fs/nfs/client.c | |
parent | 301933a0acfdec837fd8b4884093b3f0fff01d8a (diff) | |
parent | 4bf259e3ae5015e73282ba66716c4a917e1264ac (diff) |
Merge branch 'devel-for-2.6.31' into for-2.6.31
Conflicts:
fs/nfs/client.c
fs/nfs/super.c
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 4f75ec593be8..c2d061675d80 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -116,6 +116,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
116 | { | 116 | { |
117 | struct nfs_client *clp; | 117 | struct nfs_client *clp; |
118 | struct rpc_cred *cred; | 118 | struct rpc_cred *cred; |
119 | int err = -ENOMEM; | ||
119 | 120 | ||
120 | if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) | 121 | if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) |
121 | goto error_0; | 122 | goto error_0; |
@@ -129,6 +130,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
129 | clp->cl_addrlen = cl_init->addrlen; | 130 | clp->cl_addrlen = cl_init->addrlen; |
130 | 131 | ||
131 | if (cl_init->hostname) { | 132 | if (cl_init->hostname) { |
133 | err = -ENOMEM; | ||
132 | clp->cl_hostname = kstrdup(cl_init->hostname, GFP_KERNEL); | 134 | clp->cl_hostname = kstrdup(cl_init->hostname, GFP_KERNEL); |
133 | if (!clp->cl_hostname) | 135 | if (!clp->cl_hostname) |
134 | goto error_cleanup; | 136 | goto error_cleanup; |
@@ -159,7 +161,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
159 | error_cleanup: | 161 | error_cleanup: |
160 | kfree(clp); | 162 | kfree(clp); |
161 | error_0: | 163 | error_0: |
162 | return NULL; | 164 | return ERR_PTR(err); |
163 | } | 165 | } |
164 | 166 | ||
165 | static void nfs4_shutdown_client(struct nfs_client *clp) | 167 | static void nfs4_shutdown_client(struct nfs_client *clp) |
@@ -480,9 +482,10 @@ static struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_in | |||
480 | spin_unlock(&nfs_client_lock); | 482 | spin_unlock(&nfs_client_lock); |
481 | 483 | ||
482 | new = nfs_alloc_client(cl_init); | 484 | new = nfs_alloc_client(cl_init); |
483 | } while (new); | 485 | } while (!IS_ERR(new)); |
484 | 486 | ||
485 | return ERR_PTR(-ENOMEM); | 487 | dprintk("--> nfs_get_client() = %ld [failed]\n", PTR_ERR(new)); |
488 | return new; | ||
486 | 489 | ||
487 | /* install a new client and return with it unready */ | 490 | /* install a new client and return with it unready */ |
488 | install_client: | 491 | install_client: |