Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[cascardo/linux.git] / fs / lockd / mon.c
index daa8e75..1cc6ec5 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);
@@ -208,7 +214,7 @@ int nsm_monitor(const struct nlm_host *host)
        if (unlikely(res.status != 0))
                status = -EIO;
        if (unlikely(status < 0)) {
-               printk(KERN_NOTICE "lockd: cannot monitor %s\n", nsm->sm_name);
+               pr_notice_ratelimited("lockd: cannot monitor %s\n", nsm->sm_name);
                return status;
        }