]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nfs/nfs4namespace.c
Merge /home/v4l/v4l/for_upstream
[karo-tx-linux.git] / fs / nfs / nfs4namespace.c
index 4fdeb1b7042eb94378f7448275d4ee4ef4ec13bc..79fbb61ce202bcb90df2c8ad0f7f3ecf3bba7aac 100644 (file)
@@ -192,25 +192,13 @@ out:
 struct rpc_clnt *nfs4_create_sec_client(struct rpc_clnt *clnt, struct inode *inode,
                                        struct qstr *name)
 {
-       struct rpc_clnt *clone;
-       struct rpc_auth *auth;
        rpc_authflavor_t flavor;
 
        flavor = nfs4_negotiate_security(inode, name);
        if ((int)flavor < 0)
                return ERR_PTR((int)flavor);
 
-       clone = rpc_clone_client(clnt);
-       if (IS_ERR(clone))
-               return clone;
-
-       auth = rpcauth_create(flavor, clone);
-       if (IS_ERR(auth)) {
-               rpc_shutdown_client(clone);
-               clone = ERR_PTR(-EIO);
-       }
-
-       return clone;
+       return rpc_clone_client_set_auth(clnt, flavor);
 }
 
 static struct vfsmount *try_location(struct nfs_clone_mount *mountdata,