diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-23 02:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-23 02:00:47 +0000 |
commit | 06615f62b17d7de6e12d2f5ec6b88cf30af08413 (patch) | |
tree | 8766f208847d4876a6db619aebbf54d53b76eb44 /net/sunrpc | |
parent | fa9bdb574f4febb751848a685d9a9017e04e1d53 (diff) |
Merge with Linux 2.4.0-test10.
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth.c | 6 | ||||
-rw-r--r-- | net/sunrpc/auth_null.c | 1 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 3 |
3 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 7eb578a60..a295ecaf7 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -159,7 +159,7 @@ rpcauth_insert_credcache(struct rpc_auth *auth, struct rpc_cred *cred) { int nr; - nr = (cred->cr_uid % RPC_CREDCACHE_NR); + nr = (cred->cr_uid & RPC_CREDCACHE_MASK); spin_lock(&rpc_credcache_lock); cred->cr_next = auth->au_credcache[nr]; auth->au_credcache[nr] = cred; @@ -178,7 +178,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, int taskflags) int nr = 0; if (!(taskflags & RPC_TASK_ROOTCREDS)) - nr = current->uid % RPC_CREDCACHE_NR; + nr = current->uid & RPC_CREDCACHE_MASK; if (time_before(auth->au_nextgc, jiffies)) rpcauth_gc_credcache(auth); @@ -218,7 +218,7 @@ rpcauth_remove_credcache(struct rpc_auth *auth, struct rpc_cred *cred) struct rpc_cred **q, *cr; int nr; - nr = (cred->cr_uid % RPC_CREDCACHE_NR); + nr = (cred->cr_uid & RPC_CREDCACHE_MASK); spin_lock(&rpc_credcache_lock); q = &auth->au_credcache[nr]; while ((cr = *q) != NULL) { diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index d2e645acd..a9e42721a 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c @@ -54,6 +54,7 @@ nul_create_cred(int flags) return NULL; cred->cr_count = 0; cred->cr_flags = RPCAUTH_CRED_UPTODATE; + cred->cr_uid = current->uid; return cred; } diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index a036faef9..26a140771 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -800,7 +800,6 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout) "svc_recv: service %p, wait queue active!\n", rqstp); -again: /* Initialize the buffers */ rqstp->rq_argbuf = rqstp->rq_defbuf; rqstp->rq_resbuf = rqstp->rq_defbuf; @@ -846,7 +845,7 @@ again: /* No data, incomplete (TCP) read, or accept() */ if (len == 0 || len == -EAGAIN) { svc_sock_release(rqstp); - goto again; + return -EAGAIN; } rqstp->rq_secure = ntohs(rqstp->rq_addr.sin_port) < 1024; |