summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-12-03 01:30:31 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-12-19 19:52:46 +0100
commit2edd8d746e51229705367528e95e5b49bccfa76e (patch)
tree5c20f3219ac7c02daef784299bef2d4e467f9446 /net/sunrpc/auth.c
parentSUNRPC: remove crbind rpc_cred operation (diff)
downloadlinux-2edd8d746e51229705367528e95e5b49bccfa76e.tar.xz
linux-2edd8d746e51229705367528e95e5b49bccfa76e.zip
SUNRPC: simplify auth_unix.
1/ discard 'struct unx_cred'. We don't need any data that is not already in 'struct rpc_cred'. 2/ Don't keep these creds in a hash table. When a credential is needed, simply allocate it. When not needed, discard it. This can easily be faster than performing a lookup on a shared hash table. As the lookup can happen during write-out, use a mempool to ensure forward progress. This means that we cannot compare two credentials for equality by comparing the pointers, but we never do that anyway. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r--net/sunrpc/auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 867ea9834bde..a07a7c59d3a4 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -651,6 +651,7 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
INIT_LIST_HEAD(&cred->cr_lru);
refcount_set(&cred->cr_count, 1);
cred->cr_auth = auth;
+ cred->cr_flags = 0;
cred->cr_ops = ops;
cred->cr_expire = jiffies;
cred->cr_cred = get_cred(acred->cred);