From: Vasily Averin <vvs@virtuozzo.com>
To: linux-nfs@vger.kernel.org,
"J. Bruce Fields" <bfields@fieldses.org>,
Jeff Layton <jlayton@poochiereds.net>
Subject: [PATCH v2] grace: replace BUG_ON by WARN in exit_net hook
Date: Fri, 3 Nov 2017 21:50:39 +0300 [thread overview]
Message-ID: <903128e5-12e8-090f-ed8c-fd76777f8047@virtuozzo.com> (raw)
let's generate warning instead of kernel crash
[ 9313.047796] NFSD: starting 90-second grace period (net ffff880e307fe240)
[ 9317.257203] nfsd: last server has exited, flushing export cache
...
[ 9320.097513] net ffff880e307fe240 exit: grace_list is not empty
[ 9320.098570] WARNING: CPU: 5 PID: 1556 at fs/nfs_common/grace.c:112 grace_exit_net+0x33/0x40 [grace]
v2: net pointer added to warning message
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/nfs_common/grace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
index 420d3a0..3c602df 100644
--- a/fs/nfs_common/grace.c
+++ b/fs/nfs_common/grace.c
@@ -104,7 +104,8 @@ grace_exit_net(struct net *net)
{
struct list_head *grace_list = net_generic(net, grace_net_id);
- BUG_ON(!list_empty(grace_list));
+ WARN(!list_empty(grace_list),
+ "net %p exit: grace_list is not empty\n", net);
}
static struct pernet_operations grace_net_ops = {
--
2.7.4
reply other threads:[~2017-11-03 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=903128e5-12e8-090f-ed8c-fd76777f8047@virtuozzo.com \
--to=vvs@virtuozzo.com \
--cc=bfields@fieldses.org \
--cc=jlayton@poochiereds.net \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).