Merge branch 'linaro-android-3.10-lsk' of git://android.git.linaro.org/kernel/linaro...
[firefly-linux-kernel-4.4.55.git] / fs / lockd / mon.c
index 1812f026960c4229dd4c3d198b129f9554eb6fc4..6ae664b489af43a5e0936bd2e0d4b40bd016d725 100644 (file)
@@ -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);