summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_generic.c
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2016-04-22 02:51:55 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-09 15:05:40 +0200
commitc065d229e308ede426a3608cf480c61983b36fb8 (patch)
treeac4960b426633aa8ba95665e998a7ebe08238416 /net/sunrpc/auth_generic.c
parentsunrpc: plumb gfp_t parm into crcreate operation (diff)
downloadlinux-c065d229e308ede426a3608cf480c61983b36fb8.tar.xz
linux-c065d229e308ede426a3608cf480c61983b36fb8.zip
sunrpc: add rpc_lookup_generic_cred
Add function rpc_lookup_generic_cred, which allows lookups of a generic credential that's not current_cred(). [jlayton: add gfp_t parm] Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to '')
-rw-r--r--net/sunrpc/auth_generic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c
index 6ed3e3df43e9..54dd3fdead54 100644
--- a/net/sunrpc/auth_generic.c
+++ b/net/sunrpc/auth_generic.c
@@ -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);