summaryrefslogtreecommitdiff
path: root/net/sunrpc/auth_unix.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-04-22 03:51:54 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-09 16:05:40 +0300
commit3c6e0bc8a14cfc8e1d4ab87f46f77b070c815bf1 (patch)
tree77b3bdbc71d4b2d71518112dd95bf5328ff8843e /net/sunrpc/auth_unix.c
parent06ef26a0e35199cc0445d7d5708533a12af8ff5b (diff)
downloadlinux-3c6e0bc8a14cfc8e1d4ab87f46f77b070c815bf1.tar.xz
sunrpc: plumb gfp_t parm into crcreate operation
We need to be able to call the generic_cred creator from different contexts. Add a gfp_t parm to the crcreate operation and to rpcauth_lookup_credcache. For now, we just push the gfp_t parms up one level to the *_lookup_cred functions. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth_unix.c')
-rw-r--r--net/sunrpc/auth_unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index 0d3dd364c22f..9f65452b7cbc 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -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);