Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] sunrpc: only call test_bit once in svc_xprt_received
Date: Mon, 8 Dec 2014 11:59:01 -0500	[thread overview]
Message-ID: <20141208165901.GA16612@fieldses.org> (raw)
In-Reply-To: <1417459524-9086-1-git-send-email-jlayton@primarydata.com>

On Mon, Dec 01, 2014 at 01:45:24PM -0500, Jeff Layton wrote:
> ...move the WARN_ON_ONCE inside the following if block since they use
> the same condition.

Thanks, applying for 3.19

--b.

> 
> Signed-off-by: Jeff Layton <jlayton@primarydata.com>
> ---
>  net/sunrpc/svc_xprt.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
> index 0ae1d78d934d..40ecda40c2ec 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:
>  	 */
> -- 
> 2.1.0
> 

      reply	other threads:[~2014-12-08 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 18:45 [PATCH] sunrpc: only call test_bit once in svc_xprt_received Jeff Layton
2014-12-08 16:59 ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141208165901.GA16612@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox