]> 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 ec1938d4b814f3d3b9e031aa076499c7ca6102bd..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) {
@@ -460,7 +445,8 @@ static int nfs_start_lockd(struct nfs_server *server)
                goto out;
        if (server->flags & NFS_MOUNT_NONLM)
                goto out;
-       error = lockd_up();
+       error = lockd_up((server->flags & NFS_MOUNT_TCP) ?
+                       IPPROTO_TCP : IPPROTO_UDP);
        if (error < 0)
                server->flags |= NFS_MOUNT_NONLM;
        else