Message ID | 20170407181528.2832-12-Anna.Schumaker@Netapp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-nfs-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4C6260364 for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D9CC28634 for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9297128637; Fri, 7 Apr 2017 18:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33B4128634 for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933559AbdDGSQA (ORCPT <rfc822;patchwork-linux-nfs@patchwork.kernel.org>); Fri, 7 Apr 2017 14:16:00 -0400 Received: from mx144.netapp.com ([216.240.21.25]:5551 "EHLO mx144.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933093AbdDGSPv (ORCPT <rfc822;linux-nfs@vger.kernel.org>); Fri, 7 Apr 2017 14:15:51 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="186669761" Received: from hioexcmbx04-prd.hq.netapp.com ([10.122.105.37]) by mx144-out.netapp.com with ESMTP; 07 Apr 2017 11:02:31 -0700 Received: from VMWEXCCAS11-PRD.hq.netapp.com (10.122.105.29) by hioexcmbx04-prd.hq.netapp.com (10.122.105.37) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 7 Apr 2017 11:15:49 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS11-PRD.hq.netapp.com (10.122.105.29) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 7 Apr 2017 11:15:49 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Fa+o25phPaA3qSCyDWvfKqCRkccbtI/bB5aG8LMJqRY=; b=olIXsd6CCfunJh4jGKRgWMyylFilqSmFfRiHOKBbQFiGmeT7/gKxq97P5gzDZGVMj/75bNg7S7PeQDWbSTYhRhwfH2i1YMSW2RZfK/l1wWGORRELD6Zh7PYAT5LIXPuUNWg8bq5cFwS9/wjWWVsLNugETI5XZMYxn2DoaXm12OM= Authentication-Results: primarydata.com; dkim=none (message not signed) header.d=none; primarydata.com; dmarc=none action=none header.from=Netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (68.40.188.1) by CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Fri, 7 Apr 2017 18:15:48 +0000 From: <Anna.Schumaker@Netapp.com> To: <Trond.Myklebust@primarydata.com>, <linux-nfs@vger.kernel.org> Subject: [PATCH 11/34] NFS: Clean up nfs_init_client() Date: Fri, 7 Apr 2017 14:15:05 -0400 Message-ID: <20170407181528.2832-12-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170407181528.2832-1-Anna.Schumaker@Netapp.com> References: <20170407181528.2832-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: DM5PR20CA0021.namprd20.prod.outlook.com (10.173.136.159) To CY4PR06MB2472.namprd06.prod.outlook.com (10.169.186.140) X-MS-Office365-Filtering-Correlation-Id: 70775355-b39c-4b0d-1ae1-08d47de21e57 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:9bTdHKHoH00o9kpPbH7EDNDpLJd/+8+hHdKGADt8zkA9qw3HZeCcDCwIv5ogjXnIL1lv8IJGKkZKx/aB78JObNCNxez5M6H88YBJW56lKn4zZbmW4jthFUdg5jp7rCBhfj0ZEBbfEJGPGHHS4szli6sVonLGHh06/ADDSaCy8U9im7e2Df1eO0B3ePqYy8ZogIpdSA7TKiYnB513/XAPj2Wl679oZXxTU9iWSqSpjU0W3UgkYGsH4m0ZHarbvcGPZYJpT8yaSnxz5sxir49ldpSSQx212Ywcv7mc0tBh5Ord/Qx8Zikc+PyDIIjceB6GS9SMnXV6cCNMpG10x5xSdQ==; 25:cB+CeljHWYLgRHnXiVHD4B2edN+5K5q+YJQDkssL0WskroxDTqEM4pPGpm1pDG2Qa5AFq4NS8Bhp6ldy3aa4q8581JR5SVhcMoCyAJgDrQEtVpVbGzoMarw3yb6L9aEaPDZAtzZ5QHG6v2WI6vy7ewIuvMaeNACinkNNEhSJO2dfR+ZMJ0WNpTIxaXZjM0dL6q1XUpRzBCyK282mw2MbjoMvjNOjAS3yf5l6XdMY5lAoqssjTF+5FpJAMYxkUdnhubF+f1SzXw+JBJFoPwglPgy7oF8C6wx3qWFiEtXitLou/A29bKY847u131CLIrh+Q+ORKDOYYMqkV9E71gJUfJ2q4TO3bhjcgtc0ZE9MLU5RX0xLv888eP5qwspI1xXUDuEkrvikrmJrThB2T8RMCpbbq1APPxUMcc44YYhsrpWv1E14u2ZXuIuUyNkEO87gdWSWL0YNOHIt9AyHflqYpA== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:sQPGYVEowKmO/5rgq9NHcda49rkAIo5EQDyWuSez2Z8wbRIvdTXDNYnohe6rchzt0Isz//mRyDirQIsvxUNcNwiOczLGoP1T4raEBlIAnpHB44GvxmEGJx5zCrxWmwm1orvb8kUc91NA8NnskUTGRY5PDruXw1xgZOWASszrdoMn5/RLB2KuMqvKiCtUPYgxuESb1V7hEv8nGlFZLuIlk64NeGOSoCtYFSmfYh1il6om4SxdfXsLekZWBtEYVcnBGMOppRQjKqYbNDzJyToajg==; 20:FbUyF4hIOPvHF5WJXrRpEfXZWGE4NOfVqTXaEtcy6Bkswh0hB21P49+cT5UBWTWzKse1wDEblIUGfgqxPtyHT+e4Kd8PoBpjvNZOtXovdN13gU1dDOsOAdoiYxd4TXeUvT42pgDoa5ptSmQ6yFQmm3/IpeytfwGbCf/51uzkrp7CT0XarBvUIUUad2vN/8ypvPFgVqwExvzkhJpFE28VLHFAzxCk/+rAT79RpFU1m1A36FZqcyQEmNHZMaj4daJpsvUsRtb/OYj/8/tF3/dNN7qq3CQbrOokOWYQunIg6ulvFyTiDA4bENZYxnpw3LWOsy7DZAuP5n1zecQDRXojhUB376e8RFdqv9Q1eiHc/sAN8lHzxfdPdPUuYa9n1bQ+ECkpGcZtNYaFkRCmUi2YjQWZZOfCrpJAkyBxpMdJZrggmkYoN1zsHbV4mkEWO1CQCX7sSFonJ5CNKl7zYFONhHQ5aLGDTGnuzdJetqVZ+4ISgMgCQM4BREUh+taNsODB X-Microsoft-Antispam-PRVS: <CY4PR06MB2472BAD85BB7AD12377CD586F80C0@CY4PR06MB2472.namprd06.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:CY4PR06MB2472; BCL:0; PCL:0; RULEID:; SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 4:xj0IV86k3+x6p5jGZYLC0ikMlGGmRqh8hbSdIFZiEyeCjxKmg38Zm7AG9C9EpqnjhNXfgLuJiCv2UjdQL2VWpvganIXk2zTL2AmZ/Ua4SLetriwXj1Fst5ofHS+bQ+1dxxhA2T9IOW5D28PvplyUL8Td8ReD9WNGtt4eoohKM2k6yKc7+S+hr7Tv/E4gga9fPWP8+9KuMsemWh0vaM1xF3St+znO2nWivSKT8XDbDOF3M9QHqvBNrAikqZiYt6/H+rfYIX8FlX/DvMuth7jYj+VZMqGMbtmrvxwMjtuNuRE/AW3iAphBjZQODR7Ab9Uoryd08c2ejpXtRcwdnsdSGsMlnvhpUnTYkZb6EHvNTCJqn+EbRLUetWRCA7JhRvuUFPRVOmBooEqciLM4lTDbYiM1vWsHnUhNpLNI1Y4GOLw9GE8Y5lh6BN+hJIEMVYGL63Ryzj9rmQYXnw/fJ7x7G2RKQEUw7r1yCzUFqBCz2Be5aTQpjEox2mEgLf5bUKO7QhgfUyn5/rPnQb41HL4CezORRZPnKxRpuaZfsaHvzkkWRvlaWpiEZ8jaVIAIQHrQDBcQgorlWmW9tked94A8MJh6ngAEweU0YJZNNFLEUGnDj9l3zUGkmnZVUJIq3724h7T9+FUeNpuUsw8Tk77bUU8fV+nVbVoiM4hrjiRi52XVvcdzUu/xrFS8r1UNr4BQXa/fwpnLMtln0MTbt/2WnNEUJuM7G41IUi4ODVVTzDk= X-Forefront-PRVS: 0270ED2845 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39400400002)(39410400002)(39850400002)(39450400003)(305945005)(189998001)(2950100002)(5003940100001)(6666003)(7736002)(86152003)(6512007)(2876002)(6506006)(6486002)(36756003)(5660300001)(53936002)(25786009)(38730400002)(76176999)(50466002)(81166006)(8676002)(50226002)(1076002)(6116002)(66066001)(42186005)(2906002)(50986999)(47776003)(86362001)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR06MB2472; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR06MB2472; 23:Jz26fvCz9hnD4AMApGvvh7/W9WIoNmIXtqk0amM6E?= =?us-ascii?Q?OpKReC9tpvnKwhBH8ykycTlT8cJd9jUledgfoa/DxF/UUwN8FbKXtfOtgKwa?= =?us-ascii?Q?DT1ZaN3MIvB3B/KjUD07yh4J6LQKKeENTjhSvuM0SWLt1rlzVQymoV+aGw8x?= =?us-ascii?Q?MV3moeQ8zZP+TrknQqew5FOkvgsB8Zm3yLv8dFchU7AxmFs6WKW0OY5sxfSa?= =?us-ascii?Q?0+Sy2zLvUN0x4ITji0IrqGeWbdik4VEFa+Ao5cdRIijrvHHd/sNIAjn7hQbS?= =?us-ascii?Q?BASEg71AMAmBFYKjtd1gmgPMJbPK2gM4Q1RDHdmQGLG0MS7MMUEk40Yi9xhl?= =?us-ascii?Q?YMURo7GJzu9u+WOpuzX4Y6zEPXTq127wTkU/Q/Zh9pHjU5utf28h02L9QDqF?= =?us-ascii?Q?1u4B0nF6KjPoGXU7z00kohRv+iLzu6z863SnIIx21Aq2jm+M/dFUseNI6sTU?= =?us-ascii?Q?bMqEzibsIxioufz8JBPJDLSRb+XoP8vyizV0kWNZhhcWDiHmTf7cAjZhW1va?= =?us-ascii?Q?4XNzOBqaQzVvuj2EaMGixSHSkjjqp2rlWldTMLHq+TonSZGjs9xVddEn0shb?= =?us-ascii?Q?Bw+Iz5e1y6B4jd0E9EShN7kIRgF/gVSSw6eeqbZzN6DJ58dmncGosSYRoHII?= =?us-ascii?Q?qU5U2H8jojMiD+TcSiFwyPUdHRiZkJQY6PZd5/tnW601G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tLJsyoerS+IE5nevHD9nvQE/o72ViMUm9XLq+W95IiGhksCLyZStBNRjWZnPvPtTk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:9A0/cscUsgrpiOq5zJb1EFoE/3OkiKxfPe4PxKMCNqwW11lOJwbkcyFLTZ0XIP3hoeIBBpbjz43O+A+jNFPP8yLABME07A4NX1rtkJOfsoF6lBroQ2ysdch1qTVJIGht3Kp6tu29J+Sgulx10xih49ZvwUjShkN61ieMXZsnWaJ48NC/Gxp67gHGFFHJUyVykia7RsMbWmhipmEMxsa5nLPS+PzG+SK4wTdXWUo+iehEh4Tk4fCVsIJmeN3GMMimgyEn4H9ABoD2AEuUnl+YmRJekNdlitArkqo2HbDAFtmSk0Qi1a+UWllAVSYRzPNu9/K1qzRPhGIoHObV6lghgg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:48.8316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR06MB2472 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-nfs.vger.kernel.org> X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 390ada8741bc..675142189181 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -624,27 +624,21 @@ struct nfs_client *nfs_init_client(struct nfs_client *clp, { int error; - if (clp->cl_cons_state == NFS_CS_READY) { - /* the client is already initialised */ - dprintk("<-- nfs_init_client() = 0 [already %p]\n", clp); + /* the client is already initialised */ + if (clp->cl_cons_state == NFS_CS_READY) return clp; - } /* * Create a client RPC handle for doing FSSTAT with UNIX auth only * - RFC 2623, sec 2.3.2 */ error = nfs_create_rpc_client(clp, cl_init, RPC_AUTH_UNIX); - if (error < 0) - goto error; - nfs_mark_client_ready(clp, NFS_CS_READY); + nfs_mark_client_ready(clp, error == 0 ? NFS_CS_READY : error); + if (error < 0) { + nfs_put_client(clp); + clp = ERR_PTR(error); + } return clp; - -error: - nfs_mark_client_ready(clp, error); - nfs_put_client(clp); - dprintk("<-- nfs_init_client() = xerror %d\n", error); - return ERR_PTR(error); } EXPORT_SYMBOL_GPL(nfs_init_client);