From 1312c91eade49a2deaeb8f68a6ee64f533e3330b Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sun, 8 Oct 2006 14:33:24 -0400 Subject: [PATCH] --- yaml --- r: 39138 b: refs/heads/master c: 0bae89ec8b1519dae67036637942f5b5bbaa9424 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/client.c | 24 +++++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) 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) {