vserver 2.0 rc7
[linux-2.6.git] / net / sunrpc / svcauth.c
index 0148c33..bde8147 100644 (file)
@@ -59,6 +59,11 @@ svc_authenticate(struct svc_rqst *rqstp, u32 *authp)
        return aops->accept(rqstp, authp);
 }
 
+int svc_set_client(struct svc_rqst *rqstp)
+{
+       return rqstp->rq_authop->set_client(rqstp);
+}
+
 /* A request, which was authenticated, has now executed.
  * Time to finalise the the credentials and verifier
  * and release and resources
@@ -173,12 +178,12 @@ auth_domain_lookup(struct auth_domain *item, int set)
                tmp = container_of(*hp, struct auth_domain, h);
                if (!auth_domain_match(tmp, item))
                        continue;
-               cache_get(&tmp->h);
-               if (!set)
+               if (!set) {
+                       cache_get(&tmp->h);
                        goto out_noset;
+               }
                *hp = tmp->h.next;
                tmp->h.next = NULL;
-               clear_bit(CACHE_HASHED, &tmp->h.flags);
                auth_domain_drop(&tmp->h, &auth_domain_cache);
                goto out_set;
        }
@@ -187,9 +192,9 @@ auth_domain_lookup(struct auth_domain *item, int set)
                goto out_nada;
        auth_domain_cache.entries++;
 out_set:
-       set_bit(CACHE_HASHED, &item->h.flags);
        item->h.next = *head;
        *head = &item->h;
+       cache_get(&item->h);
        write_unlock(&auth_domain_cache.hash_lock);
        cache_fresh(&auth_domain_cache, &item->h, item->h.expiry_time);
        cache_get(&item->h);