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: Ian Collier <imc@cs.ox.ac.uk> Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
eb63192bb8
commit
9af94fc4e4
1 changed files with 1 additions and 1 deletions
|
@ -214,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue