linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] grace: replace BUG_ON by WARN in exit_net hook
@ 2017-11-03 18:50 Vasily Averin
  0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2017-11-03 18:50 UTC (permalink / raw)
  To: linux-nfs, J. Bruce Fields, Jeff Layton

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-03 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 18:50 [PATCH v2] grace: replace BUG_ON by WARN in exit_net hook Vasily Averin

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).