Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92875
b: refs/heads/master
c: 25337fd
h: refs/heads/master
i:
  92873: 567463d
  92871: 1d5f66f
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 14, 2008
1 parent 696e037 commit 52ae940
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9446389ef612096704fdf18fa79bab423d4110f0
refs/heads/master: 25337fdc85951dfeac944f16cb565904c619077a
4 changes: 2 additions & 2 deletions trunk/include/linux/sunrpc/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ struct rpc_cred {
/*
* Client authentication handle
*/
#define RPC_CREDCACHE_NR 8
#define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1)
#define RPC_CREDCACHE_HASHBITS 4
#define RPC_CREDCACHE_NR (1 << RPC_CREDCACHE_HASHBITS)
struct rpc_cred_cache {
struct hlist_head hashtable[RPC_CREDCACHE_NR];
spinlock_t lock;
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/sunrpc/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/hash.h>
#include <linux/sunrpc/clnt.h>
#include <linux/spinlock.h>

Expand Down Expand Up @@ -280,7 +281,9 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
struct hlist_node *pos;
struct rpc_cred *cred = NULL,
*entry, *new;
int nr = 0;
unsigned int nr;

nr = hash_long(acred->uid, RPC_CREDCACHE_HASHBITS);

if (!(flags & RPCAUTH_LOOKUP_ROOTCREDS))
nr = acred->uid & RPC_CREDCACHE_MASK;
Expand Down

0 comments on commit 52ae940

Please sign in to comment.