[PATCH] remove many unneeded #includes of sched.h
[deliverable/linux.git] / net / sunrpc / svcauth.c
index 0004c1f0ef047377d1db5a645d5e9d0e745ed069..f5c3808bf85ab7cf1d03edaf8c43bbebc5faa3cf 100644 (file)
@@ -2,7 +2,7 @@
  * linux/net/sunrpc/svcauth.c
  *
  * The generic interface for RPC authentication on the server side.
- * 
+ *
  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
  *
  * CHANGES
@@ -10,7 +10,6 @@
  */
 
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/module.h>
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/xdr.h>
@@ -74,7 +73,7 @@ int svc_authorise(struct svc_rqst *rqstp)
        int rv = 0;
 
        rqstp->rq_authop = NULL;
-       
+
        if (aops) {
                rv = aops->release(rqstp);
                module_put(aops->owner);
@@ -119,13 +118,15 @@ EXPORT_SYMBOL(svc_auth_unregister);
 #define        DN_HASHMASK     (DN_HASHMAX-1)
 
 static struct hlist_head       auth_domain_table[DN_HASHMAX];
-static spinlock_t      auth_domain_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t      auth_domain_lock =
+       __SPIN_LOCK_UNLOCKED(auth_domain_lock);
 
 void auth_domain_put(struct auth_domain *dom)
 {
        if (atomic_dec_and_lock(&dom->ref.refcount, &auth_domain_lock)) {
                hlist_del(&dom->hash);
                dom->flavour->domain_release(dom);
+               spin_unlock(&auth_domain_lock);
        }
 }
 
This page took 0.026393 seconds and 5 git commands to generate.