aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-12 14:40:14 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-14 13:42:29 -0400
commit25337fdc85951dfeac944f16cb565904c619077a (patch)
tree8c0f37eca64775825ea84ade40460862a2ba377e /net
parent9446389ef612096704fdf18fa79bab423d4110f0 (diff)
downloadkernel_samsung_smdk4412-25337fdc85951dfeac944f16cb565904c619077a.tar.gz
kernel_samsung_smdk4412-25337fdc85951dfeac944f16cb565904c619077a.tar.bz2
kernel_samsung_smdk4412-25337fdc85951dfeac944f16cb565904c619077a.zip
SUNRPC: Fix a bug in rpcauth_lookup_credcache()
The hash bucket is for some reason always being set to zero. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index eca941ce298..b38f6ee2f5e 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -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>
@@ -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;