From patchwork Mon Mar 24 04:00:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 3881151 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DAB69BF540 for ; Mon, 24 Mar 2014 04:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AFA720263 for ; Mon, 24 Mar 2014 04:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E4D52022F for ; Mon, 24 Mar 2014 04:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750760AbaCXEAg (ORCPT ); Mon, 24 Mar 2014 00:00:36 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:60093 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbaCXEAg (ORCPT ); Mon, 24 Mar 2014 00:00:36 -0400 Received: by mail-pb0-f53.google.com with SMTP id rp16so4827672pbb.26 for ; Sun, 23 Mar 2014 21:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=GvGuW990eV1BOmfdQvHjIe1gT4gTuTVrQuoiKEI2Q0A=; b=uzZ8MAVG6rqVPOGJLUAa3jiuntTsBnOrToa0SiJwjg2XMJAUY46YnCoXHdBc7MewW2 7UTUmTt9zIm8+llbrkyHJ6DkX5yQ33XdnRioJJ37rq96Wg0n8mcnyPPjaUWL0ep96YOO vAiUmHwSWYi2xrkTmhAINJTqntWuqevx8xN2BUeU0zcITGGFQcQxtoZ07t2TozNK5N9g N8jk0YLPtKUjKvTaOBTQHsSbdRztN7yL6OR0Nn/mrxFIcisUw3Q0+i7i+JqmXY6eiakI YGbnFVeUIh3Ys50ulrRFHruUkiG53h3sVMk7kYCF/QzOkcTfUrnjz9vltCGm4WBY7/Hw Rwfg== X-Received: by 10.68.198.97 with SMTP id jb1mr67302146pbc.104.1395633634626; Sun, 23 Mar 2014 21:00:34 -0700 (PDT) Received: from localhost.localdomain ([171.208.189.127]) by mx.google.com with ESMTPSA id op3sm30311432pbc.40.2014.03.23.21.00.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Mar 2014 21:00:34 -0700 (PDT) Message-ID: <532FADDC.6090101@gmail.com> Date: Mon, 24 Mar 2014 12:00:28 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Trond Myklebust , Linux NFS Mailing List Subject: [PATCH 5/5][RESEND] SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed References: <532FAC85.20909@gmail.com> In-Reply-To: <532FAC85.20909@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't move the assign of args->bc_xprt->xpt_bc_xprt out of xs_setup_bc_tcp, because rpc_ping (which is in rpc_create) will using it. Signed-off-by: Kinglong Mee --- net/sunrpc/xprtsock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 252a56e..e8acd9b 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2986,6 +2986,8 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) if (try_module_get(THIS_MODULE)) return xprt; + + args->bc_xprt->xpt_bc_xprt = NULL; xprt_put(xprt); ret = ERR_PTR(-EINVAL); out_err: