Skip to content

Commit

Permalink
nfs4: remove BKL from nfs_callback_up and nfs_callback_down
Browse files Browse the repository at this point in the history
The nfs_callback_mutex is sufficient protection.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Jul 9, 2008
1 parent 77e0367 commit ee84dfc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -149,7 +148,6 @@ int nfs_callback_up(void)
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",
Expand All @@ -163,13 +161,11 @@ int nfs_callback_up(void)
*/
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)
Expand Down

0 comments on commit ee84dfc

Please sign in to comment.