summaryrefslogtreecommitdiffstats
path: root/fs/lockd/mon.c
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2014-09-23 12:26:20 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-09-24 23:08:43 -0400
commit173b3afceebe76fa2205b2c8808682d5b541fe3c (patch)
treea3837987cb5dd87fae87b9769a571b81ce334cb5 /fs/lockd/mon.c
parenta743419f420a64d442280845c0377a915b76644f (diff)
downloadtalos-obmc-linux-173b3afceebe76fa2205b2c8808682d5b541fe3c.tar.gz
talos-obmc-linux-173b3afceebe76fa2205b2c8808682d5b541fe3c.zip
lockd: Try to reconnect if statd has moved
If rpc.statd is restarted, upcalls to monitor hosts can fail with ECONNREFUSED. In that case force a lookup of statd's new port and retry the upcall. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/lockd/mon.c')
-rw-r--r--fs/lockd/mon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index daa8e7514eae..9106f42c472c 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -159,6 +159,12 @@ static int nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res,
msg.rpc_proc = &clnt->cl_procinfo[proc];
status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN);
+ if (status == -ECONNREFUSED) {
+ dprintk("lockd: NSM upcall RPC failed, status=%d, forcing rebind\n",
+ status);
+ rpc_force_rebind(clnt);
+ status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN);
+ }
if (status < 0)
dprintk("lockd: NSM upcall RPC failed, status=%d\n",
status);
OpenPOWER on IntegriCloud