]> err.no Git - linux-2.6/blobdiff - fs/lockd/host.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6] / fs / lockd / host.c
index ca6b16fc3101a3df88d60350060eae56d6528535..f1ef49fff118ea8aa8322dd4404e0ca65ea3e518 100644 (file)
@@ -243,10 +243,18 @@ nlm_bind_host(struct nlm_host *host)
                        .program        = &nlm_program,
                        .version        = host->h_version,
                        .authflavor     = RPC_AUTH_UNIX,
-                       .flags          = (RPC_CLNT_CREATE_HARDRTRY |
+                       .flags          = (RPC_CLNT_CREATE_NOPING |
                                           RPC_CLNT_CREATE_AUTOBIND),
                };
 
+               /*
+                * lockd retries server side blocks automatically so we want
+                * those to be soft RPC calls. Client side calls need to be
+                * hard RPC tasks.
+                */
+               if (!host->h_server)
+                       args.flags |= RPC_CLNT_CREATE_HARDRTRY;
+
                clnt = rpc_create(&args);
                if (!IS_ERR(clnt))
                        host->h_rpcclnt = clnt;