Message ID | 20170407181528.2832-23-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 2F28D60365 for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27B932862A for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CAAE28636; Fri, 7 Apr 2017 18:16:21 +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 A4BAD2862A for <patchwork-linux-nfs@patchwork.kernel.org>; Fri, 7 Apr 2017 18:16:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933093AbdDGSQT (ORCPT <rfc822;patchwork-linux-nfs@patchwork.kernel.org>); Fri, 7 Apr 2017 14:16:19 -0400 Received: from mx142.netapp.com ([216.240.21.19]:36934 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755483AbdDGSQF (ORCPT <rfc822;linux-nfs@vger.kernel.org>); Fri, 7 Apr 2017 14:16:05 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="181464041" Received: from hioexcmbx03-prd.hq.netapp.com ([10.122.105.36]) by mx142-out.netapp.com with ESMTP; 07 Apr 2017 11:03:50 -0700 Received: from VMWEXCCAS01-PRD.hq.netapp.com (10.122.105.11) by hioexcmbx03-prd.hq.netapp.com (10.122.105.36) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 7 Apr 2017 11:16:00 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS01-PRD.hq.netapp.com (10.122.105.11) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 7 Apr 2017 11:15:59 -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=xdbpvBd49w8Wbzj/XRIQ0Z4sND4sSNrWy73FsvT/0JI=; b=DNHboeWQefQMeFAqrso4yqjF8hKt0BRYbyva46H/pOd3LgfX75bAHJb9vmeOkY/4sIFerEb+9Ghseg5L53yA4GIynS+hIqFSUN47wZK2QO/m6+JhfoKn6fYm/bHcjbP1s7VcoKVHVcq99dlNYTxXh3e6L3lqQsWTEy6IOLIVSfw= 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:56 +0000 From: <Anna.Schumaker@Netapp.com> To: <Trond.Myklebust@primarydata.com>, <linux-nfs@vger.kernel.org> Subject: [PATCH 22/34] NFS: Clean up nfs4_set_client() Date: Fri, 7 Apr 2017 14:15:16 -0400 Message-ID: <20170407181528.2832-23-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: f074aeac-26b4-4697-c04a-08d47de222aa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:kBfTIaJym1nXAy330kDf7mAUQDqdqLzuagWzLUZs9QL5RZTSyBkBCtJ8dm0GNfaTkrop27Nfi2GPO3cgUT/QSrMz2uJUtZpFBxTnuVKgo2EmxDwsJ2ZowtXoFfMtt/EdvXUBxvToASGu/x4htuAdcprn2RUCuukarsWKFd9CXeuapCzc6kCZat+CWM/HlTbalWd3W0MAoPjX7hSwf92bq4iwEtURSZmqoyREpXCtjQA392smp+kvv26WFPkWLB9+32BwG3Gni0OG/cEmjBG2Nkkz6pzXfpAr3ymFIL208B4GeemJ9e5kcgyJF9wfsgCyrWj7E4RpOYWkLVbv0dWxlQ==; 25:oGjrJnapRIzRCqJl05JP7bS/8sZZX8+iKuMZ/F2baaqrlObUWHHCYxxy9HXVcB2o3t8yFNE1raRJJTMO0UF9WHYcXFV1TclZpCNFFEcvQYYFTgsOVmn9dxNpfC4l8kjit+aizQI+E7oCv8XayKw00gswNSu6Xo+Yff5ypA2JilfFG+bkdEhiEElS84gzLMvBe97LFQL3YbWBRAsiGDNcKCJMcPMXKoZXWvEk24AZM2TKHnT4HCSQJs6Mg5ZBNkFIuaBx5s0ibU3cpZq7aRwX2Q5feihaJo5p7E6CY8DpmVLtYhgci7Sl6hZvXoYusDikoNOl2Xq1+uu2ePl/FfA71Y9MZWr33zEiAltqrTRvk3d7OHfMUn8WbEJWTjzmxLXXQKN/orSBmbTJ1ecOfcjDMn1z/d3bJv0dwRipIoqmjLJoPHgW2C5hOH4LCwuWZtQxYdQHIFKWo+GwOc1TDYtGXg== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:NhIU+qEk42Ye2qraS58rn596DF8FJ8d1vDKYQV3qVaIP/9umaLvLUQ3wruQkM1kJvC8uY9wOJuN8Y1pjxjlDdFTYrONTVaoZvUqwcTYLbKsczPizHmuuqS1kFf30osbpxG5RuW/h3nupVfvxHHIeWUNvGLHCs2ILZhuB1T3gTdsdxqETY7mwwrIqduKelyoisgMZeXEtoXGw64DKg5gEeIH/OhHZ6clYtnBFhmaWm6i4yBIEvYxnyiIl0JoRjw5EaBKz+E8fxkG9Zy2pNkd6aQ==; 20:aPTBq0ahF18az8OycyUOrHnR6UogiPT/6mD1hiQreHPetrvTvny0s3MEx5QjagF38HMITaersAHzvXtOsBIFmUFwexelscbnT5HnZpuWVSgL5s97OjZrGrHqDvIMRBhb8n6Qdfpa+L2snENzhWQJw8IvuAp8lPbxD4ji3R78leGYjJUKTJFoVY5YaeAbUie0i2wRH2/gjR0UE/Ma2aJM2zqCAZa3K9EacaH4SMLrA6kbVoLysA2VMucZuP0Ri6Z3eQ1dM5AVdv7ibp15d0ErIKauqc0DRn92rmgauo9OoCbCfAtJsdwQdKWBI72Zr+O7rfinLyXR7Xvmp7iqvdA5ubSkEawWAaAaD6eu//wD+vygul+86+9nl0y9ZCWz9hAyDVIFz6wF5rURYAYzRGRQw69Ezz3dYZ2A1amLJr0x6eOI9e6fCtb0I7DSBQJIdmKRyzm7LP5SdQIaSSS33nTPOWilzHtQkiQuKqo7UNPUm+gN/76cL6dIdoEkLdPUH5nY X-Microsoft-Antispam-PRVS: <CY4PR06MB2472368B6FF6B030B012E219F80C0@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:XgmN22VS7h58pfWM5qqOIEYpnD+1IFyWg9TK/InB1J+zyCdr2lIj2oXOO5fuGiY5CTyp1wpBfOUrNVBSyvKkIHDHC2vxEUQiNMnwAdDJeUgd+C+311XEvfBes0Z2BSbCeHSOwiwyfP2gW/s5oiETv8T+ecj/CA89t7mMwivRSArpJUZPtjXRvu74h5A8fwfZ7lOzaAbtINpbn1XiANG2CycivNTtHZcL7Di9904+yAX48pgeWNd6zqPOVUhRFm7Z26MmySt5uzVEr0SNi9d6dSaE7yBwRaB7+mR3wVtWCFwLuMijSGr/f96SNNcg7AeSxBCAqIm/498rTYquTI2qoB0EEkKc/Tvx8wf7nfZLarbROLLzC60P0SQzx13ChgO4Q+RqfEySlLyuQxPY5Ng7oR3NHt38eq2FqCBXHuvIsef7pv5Sju8bdp1zw0Q4guKatuGaJdVnU7QSQ1t/NA5AcdSJEhuZUIfDujD7zi2xaIFdofW92YoCVv5+d3N8usDxyF9f2BwPd75JNb72ig2CXJVqApE3Hkv65hlLr3Q9k96CpNdXZmVwQgAQTrFSStM+pNpGDdIy4608qmYe2HxOp+0o0MkeS+24+wRlmykv4qDI9KDlh8hhpw3ixvReUQH8yspGLobps1S8PrigcjtRebKNd4+In2YttlolGjM1xUGm7XbxB0nN/lpIptlu41yKeylG6xt6V56xGloun5QUsbUJYxnxlEt6VeAo6vZxeTo= 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:bLTAii14FWUzJRXMFCAKJBkTL8CfmgWPBWLTiZkpa?= =?us-ascii?Q?yPIzP8LwDrNhPlgUCruZQI4BENfa846tezfqf8hPuK8UKdxI1DyQEBXctjAS?= =?us-ascii?Q?q5hcaj9lAXqXKsdJk+NNAMF9VgdJgDKJCBNtUo9IKrzt36OpKsL5aJCIPWA6?= =?us-ascii?Q?IfiwFqywxnXMlB8Yc5KFUiOJMEna0+Ngy0GXKEaNRl0SMwAgkJC1/pb5wQUj?= =?us-ascii?Q?wcjzHeOOx0nBlfx+N2o9x+YATGCMlanYg4L5xkNq2Fz35b6iuXe6ytuLCLAC?= =?us-ascii?Q?R+UwwZiEobDUHCKGqVoq4MFpPcvfM4qJZ7C04jw0q8hN+XFcYmkVUa4AsAZm?= =?us-ascii?Q?28xQrq2bpR9zMARk/cF20CEMvG7bJOpraDmWTw31nWY2omwZxXmS8OjR4wgf?= =?us-ascii?Q?88qRoJQNm/zFT3X/WWFbT7HJ6ERRCna6M3+6GUiTtV5EmhAB/Bo2nTemnF0h?= =?us-ascii?Q?K3iJCbJFzarxEAbELSHTBBd1crkn5eo8OembESY8a6M4O7wQ9gBPYfJcyAZJ?= =?us-ascii?Q?EquJFXpJVzItiMgMk+JF33YQ73lBUWk2Vje5F0Fg7P5fU0Iay5naZVxXpGnA?= =?us-ascii?Q?DG3zWn5l5Sy6DTIAp5JWhzv0H/zxQAUT+QDJTieybysZwVOUlCkcdWqiepxa?= =?us-ascii?Q?Fi0bXu49Vfufz4yBTGLWCZ0ebiUFPvAxt49OKAbbvmXRu36257yZ1YeLpvH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zjQUklSKnwdhm98+huwUYLmtAVcYRQClWwNMTkvpYO11Am4gowIU+HAlkOycE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:y8dC63soxXHl8I8McTRuV2s6PL9y3sKwFzTsF3o2eVm4cDWprdYyBeNKkWTP9oEh/lCQBN208KNvjWbqzhZzeFY4IdNRtCwYR+ATc4VmfaKwoVrRqk9JZLzkl4OvcQbgr+9dgmtdnuAB6TvExXEMk2LB9I23P3GKmy0PYxbrhx/5q5tfklKIzAm952dblfjBZ6+jK4fx87pXhCWDKp+A7jnup5sdYZG5Pub55JUka8vGGpIndAwKaWXyymhYgE3lFP8Urz6LPhP3wxMN9uieGD69hfX65USdABJvIUklStTljjcxIaIOgTgdwmF2B3SmgCJYaisK02xL0+qS9hrONw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:56.0876 (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/nfs4client.c b/fs/nfs/nfs4client.c index c9016de3e5bd..a380255e85ed 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -854,9 +854,6 @@ static int nfs4_set_client(struct nfs_server *server, .timeparms = timeparms, }; struct nfs_client *clp; - int error; - - dprintk("--> nfs4_set_client()\n"); if (server->flags & NFS_MOUNT_NORESVPORT) set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); @@ -865,15 +862,11 @@ static int nfs4_set_client(struct nfs_server *server, /* Allocate or find a client reference we can use */ clp = nfs_get_client(&cl_init); - if (IS_ERR(clp)) { - error = PTR_ERR(clp); - goto error; - } + if (IS_ERR(clp)) + return PTR_ERR(clp); - if (server->nfs_client == clp) { - error = -ELOOP; - goto error; - } + if (server->nfs_client == clp) + return -ELOOP; /* * Query for the lease time on clientid setup or renewal @@ -885,11 +878,7 @@ static int nfs4_set_client(struct nfs_server *server, set_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state); server->nfs_client = clp; - dprintk("<-- nfs4_set_client() = 0 [new %p]\n", clp); return 0; -error: - dprintk("<-- nfs4_set_client() = xerror %d\n", error); - return error; } /*