From patchwork Fri Apr 7 18:15:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9670123 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 63B5460364 for ; Fri, 7 Apr 2017 18:16:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A0A82862A for ; Fri, 7 Apr 2017 18:16:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E80028637; Fri, 7 Apr 2017 18:16:09 +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 C5E242862A for ; Fri, 7 Apr 2017 18:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932105AbdDGSQH (ORCPT ); Fri, 7 Apr 2017 14:16:07 -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 S933017AbdDGSP6 (ORCPT ); Fri, 7 Apr 2017 14:15:58 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488873600"; d="scan'208";a="181464030" Received: from hioexcmbx08-prd.hq.netapp.com ([10.122.105.41]) by mx142-out.netapp.com with ESMTP; 07 Apr 2017 11:03:46 -0700 Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) by hioexcmbx08-prd.hq.netapp.com (10.122.105.41) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 7 Apr 2017 11:15:55 -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:55 -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=3/MT/fGgl2eJcig2ImLUkkGLG08ss2BplTx/s6S89nk=; b=E/+Lfm1FHkLO8zPxewy0fJNFpKbu0I5Dfp9ABvFGucUcbY6bTF2vuOLXGqeWfiYZLjgpCYSu+yPCktWvEAlidJ248AACMVw/0MQdHqoRD18IvNA8KbHnyuZHrrBncYRbm7iSi0C4QMdE4mcRXpGPtouMt4GdIswoXbe9EXXkbII= 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:55 +0000 From: To: , Subject: [PATCH 21/34] NFS: Clean up nfs4_check_server_scope() Date: Fri, 7 Apr 2017 14:15:15 -0400 Message-ID: <20170407181528.2832-22-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: c30cda21-656b-41ae-ef17-08d47de2223e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 3:XWDEqtPt1C93lTwE4VXk+Sun+tipKH47CALLPKNoQjOZVqlA2chflmMRol0scx44FeS06ePUYQYZ+IcmRA8Uysb0hP+hdeR+r2/suH4fNJBPU6P/LfCtSMiXRhdYSUlkzTNEN3tE5qdwNCxiQekCM4Ku3USVvw8zc8o2/sOr69lmTrQQArPDKwrDWQ07dhENMQmiU/+2USELBxPYdFxxofYZbl0r2wLZx+nVulLvymUlxCI92veDjn6Cg1EVs3oO07WhAkkspoycO01+S54RK7a2u07mV/KxPkwTm1sppFbmk7SHQoBz70feVmP+3Ivx3eP7lVxTwyJsErDviLItEA==; 25:P+EmPW/SZkopqULg+zncFhyCpE+4pKQx60NJjiQy1AIOE/Z/7dutrYRmyCWvyARbCDz8YsokYO7N9LcPM0jRhXi2OnVwf4JkyGQNK5V9f7etZKSiurfJ8qmP4ansJ8dONN3NhCLWZpKI4jcToB3SiDzZit5Bza1+hIZ7dosIUuvcFEAzI/0gS35mjm/EFla1fC5jKPfLv1NiS31M3frqcyeay3OkyEO0wr3bWUqsQqN7F93nT0Uyv1WEA6xejFy1MAPQCWija99UsxfdCvyfEdlZyz37zrNxKqfPJ1iicfES9blhLxkKnhMVBJvAmQEgRFWl49gCrLq3HVix7Aa/NDwJb1BeeUM56XDEJVUTaEhUHSSCOnD6yTTU/gODdZXbAzN+cD3Ll/LdQFRAgCfnO6IGglsrZjLFnT6PldaLUvpS5pD/duacO23pObNsZOXXV3mcglUiNVGyp456eeYXng== X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 31:ykbGhRxZlVgV2h1p9sGm7ieq8gQQB+Jge1/KRh5xBkDOVPhSq0cjRCjbUb51GmwvaCZC7r5kg9iYtV7ZHJqoNv4wjMvgXuAjaABQD+kdy30SfA0vkYNyFy4XjMq+FK2YTXE2onA4H8OVy8nC2UMoMTuc7Do4MgzAxR3M7ASidUZ+TvAj1rpLcQBARQPBF58iQp7YaJCXdbwzmu31I8ULOKfFovoTZUXTeJu0HHootqjBcZ/4BWueGhXaFdVFO1Ph17ymVFH1sybm+xfcbXlfaA==; 20:tW/bqLMr2mkdZrEgGzB/NSdyfZzn2kVjVA4BQbMeKmErh1AsbDcCL5XzOkqJrqamJNUtveB3NAiDXlnnJ6DVRw+4HRgoDyNcIMrwgb1pC7MPMvgKjLrR101ijO8sj159dpHxHo59B5NODf2r0NcPxItWK/8RvTtc4hHH6KYn0uJpT05S8OYKua13VEiJ7OKEpq5m5RJsadFsdmWYaNVmj1jnhV4I0iIm6epCUkdxzMdRCEExTWo40SauEmKMWReJDxmSNOA+0zjqvecDU20KtjYz35E6ePb/Mh4xgHJN8lMgylNBQVlat0oqHe5A/wF87W9WRu3uuv7JpeOqJWOCLpvulUJRNzhlSQV/sW3F84biVmH+OqZJBHs354R/MeiH8B400b6+vc+x7XkND3ciQQJs08/uSV8yaFHCQR4JuyWUl3Ht3x657nGX4qHQXQjosp76bwe1T11uEv1VfJpUMMpNVfD+eaNQzxoRXKiTfsHLS/ggLZf3cynhzf9j+IJs 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:GcJcEL++gSW50RpymVSywayNDBkzJ7Sb6qM55q2e557Mcru95JdEhgTJs30d1Aymf8q8CWOVQJB95Ki/Orvn9Fu9LFhAibWCKIeQbDbt2zXhJow20yyXpcSjaTacnQASeQMMFMvPNl/TQko9j8G7juLsYmBuaIw97tkvfoOCCTDdEo7DiZYW3opijlsyIPrjrT8N4eP6W/8lDKAIbyWiE56rw6DxAHSPVfXUaGqrMlPfy8/zxD50kqvzHB5XfHzfQuIPIbbslM+NZwhZQvIPpQqe0+jogLOdw4UksIMe3Ca1cHcqBxaTD1S0Xw/ZDPHHMJpcrfn7/fzUe7XX7yTGpB8HPjRSlTHfXYvyw7M1UZjndSItEybx0m1oDeUVJHOYKIgzvIeoijVDGy2qmF+TU1V7/6m1KfPhdoTl+caXcak/tC56zG9PxG9MTqOrr0QkTMC/3dnhWBEKWzVZ1/Qqvcx4D3kfCuPZFOw7qBiyGbdn8mAcv/G1+BSTOB5peisEY49XuJC1N/0KL4rveBt3DyqIEVMuMFkQshT4A4GdGa91qHtxwV4PzKekr2mpT/1TaEzochd/qm6ahB4HUj4l94HfgcDlhZu+1s4P04RV58u828F74aZIjdfJCOysDGXw+xHYaBPZUmKKtkOICB0A/jr3oLzDsuNYclIsECIlhTnNGWNq6KDQ+dOhs54wE//UZH+hUwYj+mVukKa54LYcCppMgyWZzewpS/meRy/4A6TH66h91IgP/4umz5SVZlfnMei//1+sqlxAiFl3nQFeuQ== 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-Di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SEYSi6UtdgTpES8AwucpOteAj4z?= =?us-ascii?Q?kVTcoaBJx6hRoZ4PYCxri0LCI1gBPMvdwjNppR0DxLNv0Hao3jGtbFXkMY9M?= =?us-ascii?Q?3DjaPSObDjlUkaZgMH6gAKUKujOJIiYRMuGZqABQdEqviVjBnEMcdXEa3j0r?= =?us-ascii?Q?Fc=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 6:V3+NEceBGCWeQ/naReBc4DjQKAoQ3c7kiZmlNJwMeEl1uU8CFLGsGzd+fgUfZ7M49ar3n4SegKQFVxWGbiZQWIac87F8U1saezTZmZJnktb5CIitV+jKuntDld1ozFOA6XykY68lQizozE3Lv/0ROf+X6qp9ByzKRsYkhiHOaMZRIJJlcy0hPsUDelZeT2vd299XNk28PrdjzuvicQNNZxgRxbDMhp9PvNh3VUBRB/Vhu8Il6KbUeiz/4J3r1v1UxyKASK/gD8XLO+iVHpdK6HnZG7Pj05vAjTpuD4qD//zlYDhhlsdZydzk7YUehNgOK7nSf+mYbrQrXE63PtxcVxjqeeVT/oJxIR/8oHgVta3wfIQLdwVu1j5S0mUplzOcjcaAoz4AMCiHUKX7ip4EAsU5gKmZUL+2i/Pn1NeDQRPgU+6ysdpIowdcsw+qRsVUwOwHxS0exBlgATTnq6bqMg==; 5:N21gk+cpnj0uUFErAkNQrWWNHFzBA8d0bVcpB1VmIoZhICYE5XBffuSPVRYdG8YoQprhxubxpYOW3IiPTKcBkCt6lHao0rIBU9NbzQUioJ03XDfMMlvAo943NMs53kuA/2DgWGDf9r/WjEv+fEBRIA==; 24:ddEk0Qt2/YIAHGV7ecl0KWyxB4TjnGh26h507c3vsGo9BAHe4maifWEvdrQOHOoLo/Y8sQqvaGeT8lLrhSTJaVHYrh0ozAGeMJfNYhZ7LTY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2472; 7:60EQjmrM/3c07mzd+pq+9gPAqmQkbizhycO32eo6npqt4cCQTloXUjZBmIElb1IXhWbRBjis7W0fAqTZ6HnZyqShAfL/MxBd1I1doYrp/G+h4NhIj4hn3RocXkZmdPv3qgcUVFotGl0+0rCw+Y/VJx90YMhwo6454Vta0yfFa7TDJhKfGtxzgSYc8zYt6BXvhdQFAqBSRA+b7556X/J+JpQhmaxM75E024wcBu4VyDON//3ei28obLdk2JChlIelnQ+JeX0YyTn8Ee6wYMU+tKtSHaXpKfAsdRctmpR9fTqYTDY1k50PnW7VqLTdrIDFnkC/NyXhjzWwCREHvOtSnw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:15:55.3880 (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 Signed-off-by: Anna Schumaker --- fs/nfs/nfs4client.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index ce6f2ef62595..c9016de3e5bd 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -624,18 +624,9 @@ nfs4_check_server_scope(struct nfs41_server_scope *s1, struct nfs41_server_scope *s2) { if (s1->server_scope_sz != s2->server_scope_sz) - goto out_scope_mismatch; - if (memcmp(s1->server_scope, s2->server_scope, - s1->server_scope_sz) != 0) - goto out_scope_mismatch; - - dprintk("NFS: --> %s server scopes match\n", __func__); - return true; - -out_scope_mismatch: - dprintk("NFS: --> %s server scopes do not match\n", - __func__); - return false; + return false; + return memcmp(s1->server_scope, s2->server_scope, + s1->server_scope_sz) == 0; } /**