SUNRPC: remove BUG_ON in svc_xprt_received
authorWeston Andros Adamson <dros@netapp.com>
Tue, 23 Oct 2012 14:43:40 +0000 (10:43 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 4 Nov 2012 19:43:41 +0000 (14:43 -0500)
Replace BUG_ON() with a WARN_ON_ONCE() and early return.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/svc_xprt.c

index 194d865fae722216b71a7e78c84328b2d70b1b9b..be89bb67f0ae40f3eb00f3b66eda96aa441d4f5c 100644 (file)
@@ -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:
         */