diff --git a/[refs] b/[refs] index 1682769dd5f7..b906ceaa5e6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb1055fb1b79775d398038ad8dcd2c7581f141d8 +refs/heads/master: 0bae89ec8b1519dae67036637942f5b5bbaa9424 diff --git a/trunk/fs/nfs/client.c b/trunk/fs/nfs/client.c index d2533e214255..013cdbc3b000 100644 --- a/trunk/fs/nfs/client.c +++ b/trunk/fs/nfs/client.c @@ -322,25 +322,11 @@ static struct nfs_client *nfs_get_client(const char *hostname, if (new) nfs_free_client(new); - if (clp->cl_cons_state == NFS_CS_INITING) { - DECLARE_WAITQUEUE(myself, current); - - add_wait_queue(&nfs_client_active_wq, &myself); - - for (;;) { - set_current_state(TASK_INTERRUPTIBLE); - if (signal_pending(current) || - clp->cl_cons_state != NFS_CS_INITING) - break; - schedule(); - } - - remove_wait_queue(&nfs_client_active_wq, &myself); - - if (signal_pending(current)) { - nfs_put_client(clp); - return ERR_PTR(-ERESTARTSYS); - } + error = wait_event_interruptible(&nfs_client_active_wq, + clp->cl_cons_state != NFS_CS_INITING); + if (error < 0) { + nfs_put_client(clp); + return ERR_PTR(-ERESTARTSYS); } if (clp->cl_cons_state < NFS_CS_READY) {