summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@netapp.com>2012-10-23 10:43:40 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-04 14:43:41 -0500
commitff1fdb9b805fc03fb51c7b061604360af92d0c9e (patch)
tree00d4cab63ed27a3523fc9c458ad61ec0a51ed3c8 /net/sunrpc/svc_xprt.c
parent1b7a1819078c68c4df4bba90f76b8113a08460de (diff)
downloadlinux-ff1fdb9b805fc03fb51c7b061604360af92d0c9e.tar.bz2
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 <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r--net/sunrpc/svc_xprt.c4
1 files changed, 3 insertions, 1 deletions
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:
*/