]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/lockd/host.c
NLM: have server-side RPC clients default to soft RPC tasks
[linux-2.6-omap-h63xx.git] / fs / lockd / host.c
index 00063ee0b55c6683e086d7bb82e7e298dcfe8f41..f1ef49fff118ea8aa8322dd4404e0ca65ea3e518 100644 (file)
@@ -243,11 +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 |
-                                          RPC_CLNT_CREATE_NOPING |
+                       .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;