diff options
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
-rw-r--r-- | fs/nfs/nfs4namespace.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 017b4b01a69c..79fbb61ce202 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c | |||
@@ -192,25 +192,13 @@ out: | |||
192 | struct rpc_clnt *nfs4_create_sec_client(struct rpc_clnt *clnt, struct inode *inode, | 192 | struct rpc_clnt *nfs4_create_sec_client(struct rpc_clnt *clnt, struct inode *inode, |
193 | struct qstr *name) | 193 | struct qstr *name) |
194 | { | 194 | { |
195 | struct rpc_clnt *clone; | ||
196 | struct rpc_auth *auth; | ||
197 | rpc_authflavor_t flavor; | 195 | rpc_authflavor_t flavor; |
198 | 196 | ||
199 | flavor = nfs4_negotiate_security(inode, name); | 197 | flavor = nfs4_negotiate_security(inode, name); |
200 | if ((int)flavor < 0) | 198 | if ((int)flavor < 0) |
201 | return ERR_PTR(flavor); | 199 | return ERR_PTR((int)flavor); |
202 | 200 | ||
203 | clone = rpc_clone_client(clnt); | 201 | return rpc_clone_client_set_auth(clnt, flavor); |
204 | if (IS_ERR(clone)) | ||
205 | return clone; | ||
206 | |||
207 | auth = rpcauth_create(flavor, clone); | ||
208 | if (!auth) { | ||
209 | rpc_shutdown_client(clone); | ||
210 | clone = ERR_PTR(-EIO); | ||
211 | } | ||
212 | |||
213 | return clone; | ||
214 | } | 202 | } |
215 | 203 | ||
216 | static struct vfsmount *try_location(struct nfs_clone_mount *mountdata, | 204 | static struct vfsmount *try_location(struct nfs_clone_mount *mountdata, |