Commit 9af94fc4 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields

lockd: ratelimit "lockd: cannot monitor" messages

When lockd can't talk to a remote statd, it'll spew a warning message
to the ring buffer. If the application is really hammering on locks
however, it's possible for that message to spam the logs. Ratelimit it
to minimize the potential for harm.
Reported-by: default avatarIan Collier <imc@cs.ox.ac.uk>
Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent eb63192b
...@@ -214,7 +214,7 @@ int nsm_monitor(const struct nlm_host *host) ...@@ -214,7 +214,7 @@ int nsm_monitor(const struct nlm_host *host)
if (unlikely(res.status != 0)) if (unlikely(res.status != 0))
status = -EIO; status = -EIO;
if (unlikely(status < 0)) { 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; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment