nfs4: remove BKL from nfs_callback_up and nfs_callback_down
authorJeff Layton <jlayton@redhat.com>
Wed, 11 Jun 2008 14:03:10 +0000 (10:03 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:09:31 +0000 (12:09 -0400)
The nfs_callback_mutex is sufficient protection.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback.c

index c1e7c83006292c5085d2b2cb5b54f6d46fb0e2fa..9e713d2d5d7476b1ac44a33edce36bd20b038f6b 100644 (file)
@@ -105,7 +105,6 @@ int nfs_callback_up(void)
        struct svc_rqst *rqstp;
        int ret = 0;
 
-       lock_kernel();
        mutex_lock(&nfs_callback_mutex);
        if (nfs_callback_info.users++ || nfs_callback_info.task != NULL)
                goto out;
@@ -149,7 +148,6 @@ out:
        if (serv)
                svc_destroy(serv);
        mutex_unlock(&nfs_callback_mutex);
-       unlock_kernel();
        return ret;
 out_err:
        dprintk("Couldn't create callback socket or server thread; err = %d\n",
@@ -163,13 +161,11 @@ out_err:
  */
 void nfs_callback_down(void)
 {
-       lock_kernel();
        mutex_lock(&nfs_callback_mutex);
        nfs_callback_info.users--;
        if (nfs_callback_info.users == 0 && nfs_callback_info.task != NULL)
                kthread_stop(nfs_callback_info.task);
        mutex_unlock(&nfs_callback_mutex);
-       unlock_kernel();
 }
 
 static int nfs_callback_authenticate(struct svc_rqst *rqstp)