X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fnfs%2Fnfs4namespace.c;h=79fbb61ce202bcb90df2c8ad0f7f3ecf3bba7aac;hb=c3a64171f19388200758473ed578185fa4f89e0e;hp=017b4b01a69c7a747b4afab8c7591b5f2ac59a20;hpb=ec033d0a02901551346b9f43f8ff9bad51378891;p=karo-tx-linux.git 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: 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(flavor); + return ERR_PTR((int)flavor); - clone = rpc_clone_client(clnt); - if (IS_ERR(clone)) - return clone; - - auth = rpcauth_create(flavor, clone); - if (!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,