]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sunrpc/auth_generic.c
Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[karo-tx-linux.git] / net / sunrpc / auth_generic.c
index 41248b1820c778e2e2dd6dc89c3437692673d7cd..54dd3fdead54b8813bb6cbdf769f96a11d8f49ea 100644 (file)
@@ -38,6 +38,13 @@ struct rpc_cred *rpc_lookup_cred(void)
 }
 EXPORT_SYMBOL_GPL(rpc_lookup_cred);
 
+struct rpc_cred *
+rpc_lookup_generic_cred(struct auth_cred *acred, int flags, gfp_t gfp)
+{
+       return rpcauth_lookup_credcache(&generic_auth, acred, flags, gfp);
+}
+EXPORT_SYMBOL_GPL(rpc_lookup_generic_cred);
+
 struct rpc_cred *rpc_lookup_cred_nonblock(void)
 {
        return rpcauth_lookupcred(&generic_auth, RPCAUTH_LOOKUP_RCU);
@@ -77,15 +84,15 @@ static struct rpc_cred *generic_bind_cred(struct rpc_task *task,
 static struct rpc_cred *
 generic_lookup_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
 {
-       return rpcauth_lookup_credcache(&generic_auth, acred, flags);
+       return rpcauth_lookup_credcache(&generic_auth, acred, flags, GFP_KERNEL);
 }
 
 static struct rpc_cred *
-generic_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
+generic_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags, gfp_t gfp)
 {
        struct generic_cred *gcred;
 
-       gcred = kmalloc(sizeof(*gcred), GFP_KERNEL);
+       gcred = kmalloc(sizeof(*gcred), gfp);
        if (gcred == NULL)
                return ERR_PTR(-ENOMEM);