From patchwork Fri Apr 7 18:15:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9670127 Return-Path: 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 81E5C60364 for ; Fri, 7 Apr 2017 18:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A8702862A for ; Fri, 7 Apr 2017 18:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F14128636; Fri, 7 Apr 2017 18:16:11 +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 12E8A2862A for ; Fri, 7 Apr 2017 18:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932552AbdDGSQJ (ORCPT ); Fri, 7 Apr 2017 14:16:09 -0400 Received: from mx141.netapp.com ([216.240.21.12]:2540 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933584AbdDGSQA (ORCPT ); Fri, 7 Apr 2017 14:16:00 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="194559141" Received: from hioexcmbx04-prd.hq.netapp.com ([10.122.105.37]) by mx141-out.netapp.com with ESMTP; 07 Apr 2017 11:04:27 -0700 Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) 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:53 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 7 Apr 2017 11:15:53 -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=a/5Vdvmx8fyHYKNlYWPdf3XQiR+KWnHoeWm4OwMtPRc=; b=AQLzpR3WUakQ1gVzrZdUajzee/UBz43WqeyYgWDi0DSTJS7D14hzmsyCmDgBSb+rUuLwhjb1hwdzmffgY1MHrGE09xqck48ET+Fg3o5eniC2XX9CFGwbH60bEMTcVoxKzHDnP2sc6mD786S3MyUG8WpV9JlXQs6Oh/qMTJVoYXg= 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:52 +0000 From: To: , Subject: [PATCH 17/34] NFS: Clean up nfs4_match_clientids() Date: Fri, 7 Apr 2017 14:15:11 -0400 Message-ID: <20170407181528.2832-18-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 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: 45d72c34-c0de-46a0-7596-08d47de220ab X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:y5shbGCl5yVS1FShDHxuaStPzLBgb1ae3Qh2qiwKFa2Ci4ntws7hvtfkhcTW9x/odUoWli9nrQn+6cKbOwugMke+IYEpZnrAmdT5xONjG8OxXyRuP7BjNNJ5DYlLVaSUMoxfdvh5gqlztuzO1vYLiAmataciZYWzi94gzCMQJ18fbQ4Vb6iC6u2clqnvm4ZeSCSCRlzvxCWmPl2Inl74CbpHSnQjNTb0/5q8nz3OtrsN1f2zBThuR/Y1IAc3nA3A2xdGdzttCypia7CfqyNTQSIFp9iPXEK0nhAlcpZmdY8uLR98nXhjsWut74Ri+Uo+nb+N0g2hDAoBmacYnIkNFw==; 25:oegq03zEQZPg4BD+iUb+ZJetwUtNMyHAp7EJSKjcBVx3JulNe9o4wK+Lt+Dcw5CxC2MKn6WfT+aSNXU6fgQsQxeYMt4V8dKBIktlP+eMHatSGXkKsCLBfI49aSFYbK+Zj5FNJ3yYxYofitRWYJ+ZBVxSt0qlvS4WkC/JWBhGO8sTg5MfJ1ZoNLcqvlHiL2+zRfzuYfgVwIlQqgXhRCD06fSWlUmLQVJ5rJAdJ4Of8ioV9gTGFHM257KFRqdfovS32t1Di/mulI3FmCbcSkzxnebJeLtQITa9wfMi9YuUb0kaY/wGyRVYUOsUJpHHo1I1i28i8i2/AVouQeU3egBYYs/uradjZ/CJjx37D/bYNln9KbcWnn4AmCtFChu8TpbnDTjcCgZND6Z1Ew0Isxd3NWqCRwm3dz3YMICDEgRCnhdI5qg6+FEyqG8juMjVAl21VhHxDCg1MEbneFePKlcn5Q== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:27UP8YK2y+k4L7BC4Q4qTRe/qMzIASi1h3QYEPdzkq5JuPPWuou7+sKs3ML4+e97ao5BeLuAVsdpmHfGnQMIYCLdx0vXGoccX3XsNkfzPqXaFt+5pS2vFrtxvGc20kMSNHvgqqk5yq16Vou0nRRkhvWU0f44njAI/gZrZ45RdjI5gSpgkcVXZLUPVajJDTX3n47e+nPwvBsrs5jqUVUItiihUj9wmaSP/jBOpf0fhLoGH29dYtIAtaiCu7y8aKebKXQJMtbv+bKHdn2PXMG3zsX7yP9zGsvghV3M66BjbtA=; 20:KG1JGA/bHEtaPuhb5wQSO3Sgzwoq6u29E3BOn+TmPk09jE781+yBujndQbzDahVvF2nYrquOASzC1nrYNqSjcfodFZrltU5sVDTDxPEK6PHkYnFUuM9C/pvj4adVrZB9qIDk6THg9S+s+EJi7V/mrnHuvghrU2r33fivZQtkBvd+eoermaEWUUNX+r1LJ+QTJkIGvhMXFI15ubTfcrt8dKBqErSTZABMNcqK44pbKL5+zICc/YPPozvkI6SxIJ8cN3of595rL5BIb8gFufWAkyuEAkbHUafGUKOwC31tsR3UDaZ8hiZb+LV3BSv4akrbduI+ZFsXpopVcBEtzjOXmPx2czLohVpwb9PWHepRqZfY6p2jKaUCVjMcQfzsYg+Efy1e7BuBIr5HQmCbqNBBkI6QqngHpJvCFpnST/p1X6pZAXYunoHqexg23dK7JqxBxYwCGXqN2eZlMeWzJNZ+i+7vvpMq1nChXbj6xOHXphmAVMGVb5WBgEB15wy3AeqV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); 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:fVJwC55adnXDFJSCO+MDb4sobJTtcbYbW+fF6ooiaE4BBLvhXRvNdAPYQXWYUdKZTKqXzWehN7nCkLEloi/DqRUljU8onuaqwISpszza2k4pSKS6Gc/INqClwS+e15H/EbZzwHXbGp4cbXDWn0QWrOAatePSmddpJhQhHtc3RJyWvpE7bJHpxOEURLI04Oj09iGkBX0kgHbgEOYjVUIDcA2KOZ34NohG2fi9tkK4s0nibX5xDZ300cojnJR9Q1+T4hKYqfyk3jJ5HMOt71TzQijtIhiMuYPxYA3kHPBM0XSVwyv62YOUVp5xUnhEvbMxSt96pzt1tqm1Lme9UuVC3MJuKH6dRqGjeNKuUcrXgr8Hy6hTTEjf8NWqbX6q8cUgIqAyJp929GHrbNKjJSSnEQxOcSK6VEeT3levWrRtJDdcm1luyem2sn1aprQgEaBuJHxrpzwtS0iZhCaOCLwCR3v/OYWs1PNhTp7rYfRNz9vYcORBw2Fts+kusRWmpPK9yLvDuKGNlvY5GRMWWZTZQwKFaXQxyvOnNvNswRaONrG6/fQ7TO2zjuMkuXYcX/EqcLDs89UwUGbyWbadumAE345gHPOJXutHCh0rgOp/e7E4T1164usgHRvq59Qcs8cu9zieo+z1/sPN/FkzgCCCsXivPTr2fDlJpn4pKcNI2SooQtX+QgJ01x/Af4wPpbQn3ZK/isqjVx7tOeVRIA2qFb6Lt2uzI3nhRR8DsHJt39cLvoPqtqIIjXXOtHhkG+f6UZa3t63BBXGvZGw/hv4+EA== 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)(15760500002); 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:Akxvx9qILq5YMJb4QWy6hKsEV0WW46EC/TuRys5fC?= =?us-ascii?Q?qwAWecaRsc+5y4ZTBAScl30llH3ntdSPzET4DkL+BriBL4myXx5JtrxY/0Hm?= =?us-ascii?Q?puGmtUHpMBUVQYu/GwcFLh1CmOxpi4mQi0M1w4lroxXddTo5Ldt+76QpzcGH?= =?us-ascii?Q?OnpYoUc5AWedLtUVV4d7jIqOT5kalhaFrfuiFXS2qqlasoieoctmiQWlIQ5M?= =?us-ascii?Q?iHIvHMbsGOz/HjSnCPavP1108jLlX5tPLiQBnN/Xmstr5CyalR9bQkIJfSTf?= =?us-ascii?Q?b5R3yVqYcBkbS6DptwkcO5f8XdsnKgWdGRX2sCmb3IUUGrBCbridc9WPYU+S?= =?us-ascii?Q?j8RAD2L2OVHReJt9HB7qqOKc+TN/hm2rPclRuq2cjJDu1lMkrNOjWWtziLpJ?= =?us-ascii?Q?4aBzydCljcTV2EZ0RDlFtt/J4AvSBqh+9fNCCQeUfmaeG+6Z69aMMNJ/zvsY?= =?us-ascii?Q?VCHyXGtoYP4aHkUQmASlN5o0R8FjNSo9JSiZM4uUgNTjgOfA94kL3EL5pMKH?= =?us-ascii?Q?akyoVWxEc64iLFhHL9ITRMRwEFmT9qP/4h/oSP7d1JrntgjGL8z3+Rqo4P57?= =?us-ascii?Q?O78eH+8ED+KNQHE2Mu7kA5SSYIU/QjQUCKiqI50+udrr3cwD6N4kqAf4/xeS?= =?us-ascii?Q?eOc2ScyyMozLG/1HKSgnI+9JcleeLCAX2eBhDPdWs8EqAonmudfH3q0PhNoa?= =?us-ascii?Q?lVUvWEQeCGny1W6O/rigkfZ97NsLSDdTDH5UgB6X+23oQO7cMSfbizt7PQ8o?= =?us-ascii?Q?Y0fkbQbzx/xgLggeQRUCa6wlLqxcRk4hiyak7d/4hVsfsf8gNRdw040p/Spk?= =?us-ascii?Q?2XJN9cciEbdrBvS6jfbbLkUlNpQIu65dQQH1XQeDuZflqjZva4gNq08ONyfM?= =?us-ascii?Q?FAkEPV83YP4oLqhNKrDY8Oi18rJf0y2cFO8wlapU1SKT/Vo6ZwtEVtAOX7r3?= =?us-ascii?Q?0qshTEQAzEPhSGI6kMaLqRUiabHBaXynd+3Fh6comGBsRoURdrEXYORMWHdk?= =?us-ascii?Q?uw=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 6:yM58VCAK32trn+ceEjXLpErhoCHLYcnY5guIj8dcYBSE03WkSUP2qo7lGFPQj/e9P7f1dC5tkRY2A1Za+gdEy2mDOwima8NNNRSk1xeGYHfT44OREGqq187ii7zoJUqXRYwBjQUaTFWNSSEh5vX9xloOZo15MTTFRRDNfDQq2jP9ZsWJNXK3UuI3R5DHXfqxrHg0hlOy1xPf7SB1XYDum2uiO+FBtR0Rq6TTzeoGmElFxYUzMAd0HFTx9oRo4g/PrE648veE0vd5/SygzvvvACaaQ4YE2xqLtSO/2C4AxCqZPruRksmahRJsnFaFE3Pr34PaDXcda31o+skO1gcb6RpmZFxXuXMAtCkVNhMLjcIP+lBuMMQRR9g5BWy6LzB7hFUe+PMDejuk9oOQYaVDGZrFHD07hQn1axSAWkPBhXx9UsFoNpI/2wQxWIlhZaRafLXo5BJdMv1K0fNtytETmA==; 5:62/SG7IVFe0LjdCqW1Q557Omefjzr08rr3ay8JgEccs6TQBLFQh7Bboyb58EslBTbbIeeGV7FXkqU0G7dPGeGf7d6pYRPMEy2g+XUaqHG5TyjMRGPYDwF9AnlYUk6sibVC7fel0WhkO1G/fcszMg/w==; 24:dV9B9elc/2jte6fPPJN/nmTSAce63RRUixEdAwbRQ6IGGd0HxRGPJF/HvMaTlnvugbj/g6o9ZQ7/sKq2P2rz3wIA3IwX/dfqXODl35u3Eds= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:C3NNVhHre1pYgfD7ZZmn6ncr3kcNXKuai933obuVPcH13ngR/dTG9DecoETC5ciD2sBYaMvrQ8hHtKfH2NTzdFhXU1bd+x+s+HpILiOYFOZbXLaHcesna/h5XddjOi5fch+HycxwQPBW3DuXpNWZqDCcvlUDzj/ixMWAYKMdUG54oCJXxDFIyx/jG5FNYib/KPs134shLBLUEYRF0Q/7ME85HfStkIth4/a8ki3I4tB8H1PMKT9rSX5g7LCNc9Px79Fg4cPgBoYGckqymcr70IHxIIx5p9pn+Zbx9LVye+yi2G+CdwSjvf15RzbOBPMJlAW90mjMsdWrO+7uHNqHvA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:52.7388 (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: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anna Schumaker If we cut out the dprintk()s, then we don't even need this to be a separate function. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4client.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 8346ccbf2d52..39b8c38b6a68 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -583,21 +583,6 @@ int nfs40_walk_client_list(struct nfs_client *new, #ifdef CONFIG_NFS_V4_1 /* - * Returns true if the client IDs match - */ -static bool nfs4_match_clientids(u64 a, u64 b) -{ - if (a != b) { - dprintk("NFS: --> %s client ID %llx does not match %llx\n", - __func__, a, b); - return false; - } - dprintk("NFS: --> %s client ID %llx matches %llx\n", - __func__, a, b); - return true; -} - -/* * Returns true if the server major ids match */ static bool @@ -680,7 +665,7 @@ int nfs4_detect_session_trunking(struct nfs_client *clp, struct rpc_xprt *xprt) { /* Check eir_clientid */ - if (!nfs4_match_clientids(clp->cl_clientid, res->clientid)) + if (clp->cl_clientid != res->clientid) goto out_err; /* Check eir_server_owner so_major_id */ @@ -765,7 +750,7 @@ int nfs41_walk_client_list(struct nfs_client *new, if (pos->cl_cons_state != NFS_CS_READY) continue; - if (!nfs4_match_clientids(pos->cl_clientid, new->cl_clientid)) + if (pos->cl_clientid != new->cl_clientid) continue; /*