[PATCH] sunrpc: fix refcounting problems in rpc servers
[deliverable/linux.git] / net / sunrpc / svcauth.c
index 5b28c6176806321af56ff3edfe464c7fea297e7d..0004c1f0ef047377d1db5a645d5e9d0e745ed069 100644 (file)
@@ -35,14 +35,14 @@ static struct auth_ops      *authtab[RPC_AUTH_MAXFLAVOR] = {
 };
 
 int
-svc_authenticate(struct svc_rqst *rqstp, u32 *authp)
+svc_authenticate(struct svc_rqst *rqstp, __be32 *authp)
 {
        rpc_authflavor_t        flavor;
        struct auth_ops         *aops;
 
        *authp = rpc_auth_ok;
 
-       flavor = ntohl(svc_getu32(&rqstp->rq_arg.head[0]));
+       flavor = svc_getnl(&rqstp->rq_arg.head[0]);
 
        dprintk("svc: svc_authenticate (%d)\n", flavor);
 
@@ -147,10 +147,8 @@ auth_domain_lookup(char *name, struct auth_domain *new)
                        return hp;
                }
        }
-       if (new) {
+       if (new)
                hlist_add_head(&new->hash, head);
-               kref_get(&new->ref);
-       }
        spin_unlock(&auth_domain_lock);
        return new;
 }
This page took 0.02573 seconds and 5 git commands to generate.