Commit acf06a7f authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields

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: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent ef17af2a
...@@ -220,9 +220,11 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl, ...@@ -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) 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; return;
}
/* As soon as we clear busy, the xprt could be closed and /* 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: * 'put', so we need a reference to call svc_xprt_do_enqueue with:
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment