From 96dcadc2fdd111dca90d559f189a30c65394451a Mon Sep 17 00:00:00 2001 From: William Dauchy Date: Wed, 14 Mar 2012 12:32:04 +0100 Subject: [PATCH] NFSv4: Rate limit the state manager for lock reclaim warning messages Adding rate limit on `Lock reclaim failed` messages since it could fill up system logs Signed-off-by: William Dauchy Signed-off-by: Trond Myklebust --- fs/nfs/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index cb708b20a775..119006b0815a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1261,7 +1261,8 @@ restart: spin_lock(&state->state_lock); list_for_each_entry(lock, &state->lock_states, ls_locks) { if (!(lock->ls_flags & NFS_LOCK_INITIALIZED)) - printk("NFS: %s: Lock reclaim " + pr_warn_ratelimited("NFS: " + "%s: Lock reclaim " "failed!\n", __func__); } spin_unlock(&state->state_lock); -- 2.20.1