diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-12-01 13:45:24 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-12-09 11:29:14 -0500 |
commit | acf06a7fa12070abb3eab24fc4bc30e361a7c416 (patch) | |
tree | 46fbb92634614a5b5bf3488d38cb529ff08d3bd1 /net/sunrpc/svc_xprt.c | |
parent | ef17af2a817db97d42dd2ec0a425231748e23dbc (diff) | |
download | linux-acf06a7fa12070abb3eab24fc4bc30e361a7c416.tar.gz linux-acf06a7fa12070abb3eab24fc4bc30e361a7c416.tar.bz2 linux-acf06a7fa12070abb3eab24fc4bc30e361a7c416.zip |
sunrpc: only call test_bit once in svc_xprt_received
...move the WARN_ON_ONCE inside the following if block since they use
the same condition.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 73d40bd1839a..c69358b3cf7f 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -220,9 +220,11 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl, */ static void svc_xprt_received(struct svc_xprt *xprt) { - WARN_ON_ONCE(!test_bit(XPT_BUSY, &xprt->xpt_flags)); - if (!test_bit(XPT_BUSY, &xprt->xpt_flags)) + if (!test_bit(XPT_BUSY, &xprt->xpt_flags)) { + WARN_ONCE(1, "xprt=0x%p already busy!", xprt); return; + } + /* As soon as we clear busy, the xprt could be closed and * 'put', so we need a reference to call svc_xprt_do_enqueue with: */ |