nfs4: remove BKL from nfs_callback_up and nfs_callback_down

The nfs_callback_mutex is sufficient protection.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Jeff Layton 2008-06-11 10:03:10 -04:00 committed by Trond Myklebust
parent 77e03677ac
commit ee84dfc454

View File

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