From: Weston Andros Adamson Date: Tue, 23 Oct 2012 14:43:40 +0000 (-0400) Subject: SUNRPC: remove BUG_ON in svc_xprt_received X-Git-Tag: next-20121102~90^2~18 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5302f4d9f8402fb3e0ccf39200ec274cb65a3720;p=karo-tx-linux.git SUNRPC: remove BUG_ON in svc_xprt_received Replace BUG_ON() with a WARN_ON_ONCE() and early return. Signed-off-by: Weston Andros Adamson Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 194d865fae72..be89bb67f0ae 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -218,7 +218,9 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl, */ static void svc_xprt_received(struct svc_xprt *xprt) { - BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags)); + WARN_ON_ONCE(!test_bit(XPT_BUSY, &xprt->xpt_flags)); + if (!test_bit(XPT_BUSY, &xprt->xpt_flags)) + return; /* As soon as we clear busy, the xprt could be closed and * 'put', so we need a reference to call svc_xprt_enqueue with: */