]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/sunrpc/auth_unix.c
sunrpc: plumb gfp_t parm into crcreate operation
[mirror_ubuntu-artful-kernel.git] / net / sunrpc / auth_unix.c
index 0d3dd364c22f5e1671e1048d8abf4d37b51e268b..9f65452b7cbcbe380a36c0941176b5562a434f88 100644 (file)
@@ -52,11 +52,11 @@ unx_destroy(struct rpc_auth *auth)
 static struct rpc_cred *
 unx_lookup_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
 {
-       return rpcauth_lookup_credcache(auth, acred, flags);
+       return rpcauth_lookup_credcache(auth, acred, flags, GFP_NOFS);
 }
 
 static struct rpc_cred *
-unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
+unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags, gfp_t gfp)
 {
        struct unx_cred *cred;
        unsigned int groups = 0;
@@ -66,7 +66,7 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
                        from_kuid(&init_user_ns, acred->uid),
                        from_kgid(&init_user_ns, acred->gid));
 
-       if (!(cred = kmalloc(sizeof(*cred), GFP_NOFS)))
+       if (!(cred = kmalloc(sizeof(*cred), gfp)))
                return ERR_PTR(-ENOMEM);
 
        rpcauth_init_cred(&cred->uc_base, acred, auth, &unix_credops);