summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-10-31 13:28:29 +0100
committerJ. Bruce Fields <bfields@redhat.com>2014-11-06 20:47:33 +0100
commit9af94fc4e470deab3427d07551725f0bf844ebc8 (patch)
tree9153754b378bd383b798f256be80f6ff1ebc736e /fs/lockd
parentSUNRPC: off by one in BUG_ON() (diff)
downloadlinux-9af94fc4e470deab3427d07551725f0bf844ebc8.tar.xz
linux-9af94fc4e470deab3427d07551725f0bf844ebc8.zip
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>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/mon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 9106f42c472c..1cc6ec51e6b1 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -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;
}