]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfs/client.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
[karo-tx-linux.git] / fs / nfs / client.c
index 8106f3b29e4aa9747fd786280b132d7c41332154..34c3996bd0f582438164602a64a6dbd5254e1247 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -323,25 +322,11 @@ found_client:
        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_READY)
-                               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) {