From patchwork Fri Apr 7 18:15:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9670125 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 6479360364 for ; Fri, 7 Apr 2017 18:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D74F28634 for ; Fri, 7 Apr 2017 18:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 523312862A; Fri, 7 Apr 2017 18:16:10 +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 E69B92862A for ; Fri, 7 Apr 2017 18:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933017AbdDGSQI (ORCPT ); Fri, 7 Apr 2017 14:16:08 -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 S932552AbdDGSP7 (ORCPT ); Fri, 7 Apr 2017 14:15:59 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="186669775" Received: from hioexcmbx05-prd.hq.netapp.com ([10.122.105.38]) by mx144-out.netapp.com with ESMTP; 07 Apr 2017 11:02:34 -0700 Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) by hioexcmbx05-prd.hq.netapp.com (10.122.105.38) 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=cp1+Yo7o0+CXyNhPbMUo/Jk72kZ7EYki/Xw1K/FjMM4=; b=OziwUM6ETsrg2e9N8Hd75dEfNDYjfCO8XQsS0DS7UassuhKzaL6s/L3weYVyqbr6yGRmpk7LgGyVziVsIbd4Pmz0DzzwPpp1FZezq7vL2OL/0TLZK8ZsTEG5MRhHXVU0I6t6EDidhHVAtyNPpRM3ldPjCkU/ddqeUdgj7j3EWkQ= 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:53 +0000 From: To: , Subject: [PATCH 18/34] NFS: Clean up nfs4_check_serverowner_minor_id() Date: Fri, 7 Apr 2017 14:15:12 -0400 Message-ID: <20170407181528.2832-19-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: 8c1226c3-3aea-4ecb-768e-08d47de22108 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:TcT21JuuBsPNwdMl7UAVjkJiXTkSnFsTqYTYrksmLQAwy0tjCs1c9/SZACkJLi4gKXzhrxPRJ9jLFGb7uVmtAA9pMhhrJqEYLbP9U1KHq63IJk+UM5xPgAp77IYapkAqaEC32pq3iA2gBUo7uTedJ8pw/0XJdxIlraiPdqagzRAFB/TKOm/bDvCks/X2P/ulr8KAKeahP6mt3ZrUcBhkP7RZv3Tgazxbw8MYdHPoCzAm9NotaUSTI8/VQJ6GmT8aVSusPxbWgQqfJynYgZ7TWUz9ekGaysY8PeZmZ41XDZ0Kz7bAMr7AW/U1vHvykx205ovDhnQnG2PnIm6T24gHDQ==; 25:dJdjxCvIW4l7xpR0ZSbXG+Xh9/M/eAzgAuNvQ//tShtOHjGrzmdxDlXn2VrOaJ37l+6sEoIXllRMAM735kE1OnBoVks4/95idDZoW97qJqaBfYLUno7RSzzH9fiH3yKOMqNd+LWMzbPwgrCbBiJPmTDCBod46Wb3KnglL7qelJDYdQxHnItXfN/rynh7HgZxH3Ng/mQVpkjxAduL43pomRgn9Kc+OugHljznHz/dI+mVDPSJ8neo8Fx8n5dexxzt5lMCIL9LwfzTWRpuOaMNFKUxReFISmYwKvQoQzAJSti57zAjm7HF13uMbprNT0rLZf4Y9blwJ43cqp9fTaoEr7mvU+XZr3JNyYSivwH1tCcboH3gbbID8XRLMygfasOY7XX+Z0Edn0ewxFB6xngJlhpoK0tnvJS2ruw/z2w2SWLTO2YiOma9eQMtols8kWzb3lKXOD2ar/Qu0XsKG4/y/Q== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:6UP4XIDAgY4kKfCStYTZETEmXWHe0giMmT/EhfJrQLtD7fU1WCIuOIExEm1Zwxcbhu5InKOVFKUhvQhyriRbdr7EVsjqnqFU5591VhGKYVooZHYmqA3k+wRE8NubG/T/faDJSp1GNPMB9MsezV07p1zUnsO40b5qpgWb75UapQHSJAw8ic5fFO+UJGLpIkXa807mgiPUtJAPh6ERyrhy+sbFnKf7Bs4khjuPqCSAgSRBaP5YrjhiHkr6UPjS091CsH4i6WHfU7B2kFCBCDHuQbtufBhZ9uq8sYKOqT9Vtbo=; 20:bBZ8dSNRkEYiOdmf34UJmYhT17Tf+aPEnyyiQNbbg0iOgJfeINatv5BXnsbgd4hTcl+xiAQIUgr36Jn979Ngr5Mm0Bl/jK9lAe747cMDc3xTK1v/c4HWYH8AzGveBmEGHUEqrqj28R7st2t8T+k5Vphr86JCOnE/varPWHSIeWRuLS3FQKBtoMmwKzzlnMLla+1Uo8RNj8aOOhbZd+u7zVHetC2QroocHwfEqTs2FrrZkrNUhLw6CJUiwynMQ50lnwYFK4PN023cTDLGkQqSYpqlLnWcubqPB7FtJpKmmi/LcrY7QWiSMtsfwahBfCXPp5FHNmy5L+PKFSrKU/NDciQ9qvnnw5xr1FfQ5T9V2tlYOX/mbri5UVoohi7ADCsG1viZlIaQxzzQEe2BqxfvWN9XablhFjoFD8qKvVQsdleiuxZuA1eJaTdB8qqmPb1C5eKRCnpX10DTzY3hSODJOr1qK3chHrfy5E04Mgrn7yDZazEyHypkbVUe4tNQWyQ+ 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:v0JPlhLKT1JZNxKADJl+SOHjdhOjfCeWTehyb1bWcbLQ2CaHG5ctBba9bWXnE9/2ThkLYWAnQsRHWATMaSXMk6WdQIsGQ+n9oFnAyGmgRx8f1L59EThjKbOQCkEJtfBTZlzmqD4V9W1/9RoA7CmiYPiASLx3s536bIgU/JHyqRrbgO3PLxPdqA1piOGpJcX3sEAgd78j+S900AXUJvJh1q3ugnG5YeYdwG8AlfHwdRyO5JuYMuvCQlGw2CXKlpsvwca7ao8bU3hoxm2xHabtqfclPbzi4iRIXYJJSZb2PctteTPRw0X6sirp1oB574lsWtbHDyU+NiXUCJf/yOSjzAgE8nRNuN1vX7Tgxp7F05JPJTLwupDGVtZDD0N/RQOr5fP4Fcgm1RtS97Xv2u1/shOicEsUno8OnOYH5Kw1jhW7l1lbo9cGHGpgLW6MLCH1fmTwL4O8hrf8aWnPSoHMo/UBr9MGiunL15XfYcgPw5dcnRfHRiE2UhDlqK79mjhJXujsLF28Yv/spdfvR3n81/S5ARxG9j64HH1hveDyNL9bCgMU1ElJRhcmd3TUY9eGCfXG+eE6D3+xTpTFKyfN1XyAuNwNz/DiU/PZj9M+Y7eDjpo8aoUmn3qFuBlmLXbiodw8BnO/TolhDDo2dycd5PEQvM37ubl6cEWTB9trPhQjl4N2veGyY0jbX9Uwj6LI/lP59u6uH8VBLAxknyQ1M7/d9AmgkLM2sWZBEzzsfqEiwf94ZY8c99NbW89v7itQOPqEmmfTGZnHVyAvHSJP4Q== 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:C8dmbZ0zJMXDuC/C3SnyladKMRS7wU+K8oTG16aBy?= =?us-ascii?Q?4YAIbtI+AFoVtG4BUpY5WmwnjVFE/cDS4nP+fFN6U2YvQPr8cQuNumRXrLUE?= =?us-ascii?Q?fQbtwBHMmWfU1MGm6c/G4nhCmu5sDKexU/DDlMpWNIsUJiEJ30f0cYzT5hV0?= =?us-ascii?Q?AQn4ZJx1fG+SJV7CGQWeFhU+hz7pM79BjU9PQFNjxZkWKWYezU7216EP4lET?= =?us-ascii?Q?kNpHHgmIzJhBXIBGr69MZYDgU8nnWOEyrs1M/d5p0HaLqaWCwo8MA+JyT2rS?= =?us-ascii?Q?R2vw0IEie9j9CXq0R82Iqx43z02iU75CqqMb21jRV0a4qRTCcMf/Ocr+Y9Pw?= =?us-ascii?Q?mpjnRoYJ4f648OvyM0CdHswagpOono+mCmnEWNgpyPU8V1SXcQspgpZ1RFw6?= =?us-ascii?Q?nDATvwXnfxWFY/4sCmMBL85f3dMmcvhFOmEwpzrmDQSTAMpkOOwU0buCo0ZJ?= =?us-ascii?Q?zIWR/pg7pS5eXk8Bi4MG/0f7uBmnmyfTqTfa9M6b5YqTjBwryj1vX2F2G1DJ?= =?us-ascii?Q?muQBA9P9e+nkUJOo7KKEb3tUlU1dwTTOsxkk/83xGtgybobggiHnE9Fp45JH?= =?us-ascii?Q?9MD4Hbt2Q0NJXMlxp7A2BTURFvEJZpu0k5Xd/BGkPvdbP21ymGdwaTJDd871?= =?us-ascii?Q?k4FrO7PhmJL3Lv6vA0N0Mh9fAlGgReQ9oon3tauFaoPwazi7FmT3KXeJsHVu?= =?us-ascii?Q?63ya4ZQCRTI9lVr5msumjlzsx5vsAYcx200yNIboxZAC36ZxKAPSq+4nD8gy?= =?us-ascii?Q?N0ZBfh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vt0rNi1s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:/d3ZXWbagbDKe/heDUJ2HWBEG+ehxK1gSYstr6LZnCHKVuQzAQCg1hmVgB7yb9UEV2AJYziRKaTDq6xjozlyv5jTUw11RZRMcP/M2+X8oNPl/VJKctaPncRXk1+1xYm6IOK/ovlXhKG3HzQPeXm6eFwk1s4U/cn3SY2lA2vzJM1moDU9dWqE/qNZMdv7nxmnjgb6xgjBA3BCmq0xL7fieme1smt/tTvbCLo0PlIHjEfK/LZRhNHkLVSvYEJFtV+PSRZJc+ErOTZAjcrSxoaL4ebDAgIYfxIqum6RT4Ww7KP0rbqzyD/d38jkGEQwaQC22cgFf/pxBVhIkrzV9Kk50Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:53.3523 (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 Once again, we can remove the function and compare integer values directly. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4client.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 39b8c38b6a68..4f4f179cb849 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -604,25 +604,6 @@ nfs4_check_serverowner_major_id(struct nfs41_server_owner *o1, } /* - * Returns true if server minor ids match - */ -static bool -nfs4_check_serverowner_minor_id(struct nfs41_server_owner *o1, - struct nfs41_server_owner *o2) -{ - /* Check eir_server_owner so_minor_id */ - if (o1->minor_id != o2->minor_id) - goto out_minor_mismatch; - - dprintk("NFS: --> %s server owner minor IDs match\n", __func__); - return true; - -out_minor_mismatch: - dprintk("NFS: --> %s server owner minor IDs do not match\n", __func__); - return false; -} - -/* * Returns true if the server scopes match */ static bool @@ -674,8 +655,7 @@ int nfs4_detect_session_trunking(struct nfs_client *clp, goto out_err; /* Check eir_server_owner so_minor_id */ - if (!nfs4_check_serverowner_minor_id(clp->cl_serverowner, - res->server_owner)) + if (clp->cl_serverowner->minor_id != res->server_owner->minor_id) goto out_err; /* Check eir_server_scope */