Skip to content

Commit

Permalink
lockd: ratelimit "lockd: cannot monitor" messages
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Nov 6, 2014
1 parent eb63192 commit 9af94fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9af94fc

Please sign in to comment.